From c73de889975c9ad5ec98ac06846118827e205b8e Mon Sep 17 00:00:00 2001 From: vsonnier Date: Fri, 1 Jul 2016 20:35:21 +0200 Subject: [PATCH] FOCUS2: disable events while saving or loading sessions --- src/AppFrame.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index 3ef14d2..3470d06 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -1584,6 +1584,10 @@ void AppFrame::OnUnSplit(wxSplitterEvent& event) void AppFrame::saveSession(std::string fileName) { + + //disable event processing the time of saving + wxEventBlocker disableEvents(this); + DataTree s("cubicsdr_session"); DataNode *header = s.rootNode()->newChild("header"); *header->newChild("version") = std::string(CUBICSDR_VERSION); @@ -1633,6 +1637,10 @@ void AppFrame::saveSession(std::string fileName) { } bool AppFrame::loadSession(std::string fileName) { + + //disable event processing the time of loading + wxEventBlocker disableEvents(this); + DataTree l; if (!l.LoadFromFileXML(fileName)) { return false;