Dual bookmark backup files with user notification, auto-recovery and bail; save top level branch expand states

This commit is contained in:
Charles J. Cliffe
2016-12-27 13:01:19 -05:00
parent 69e23fd13a
commit 68495b4d90
9 changed files with 222 additions and 28 deletions
+10
View File
@@ -678,6 +678,7 @@ AppFrame::AppFrame() :
deviceChanged.store(false);
devInfo = NULL;
wxGetApp().deviceSelector();
saveDisabled = false;
// static const int attribs[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, 0 };
// wxLogStatus("Double-buffered display %s supported", wxGLCanvas::IsDisplaySupported(attribs) ? "is" : "not");
@@ -1293,6 +1294,11 @@ void AppFrame::OnClose(wxCloseEvent& event) {
}
wxGetApp().getSpectrumProcessor()->removeOutput(spectrumCanvas->getVisualDataQueue());
if (saveDisabled) {
event.Skip();
return;
}
wxGetApp().getConfig()->setWindow(this->GetPosition(), this->GetClientSize());
wxGetApp().getConfig()->setWindowMaximized(this->IsMaximized());
wxGetApp().getConfig()->setTheme(ThemeMgr::mgr.getTheme());
@@ -1926,6 +1932,10 @@ BookmarkView *AppFrame::getBookmarkView() {
return bookmarkView;
}
void AppFrame::disableSave(bool state) {
saveDisabled = state;
}
#ifdef _WIN32
bool AppFrame::canFocus() {