mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-09-14 04:37:49 -04:00
FOCUS2: disable events while saving or loading sessions
This commit is contained in:
parent
314a95c3c8
commit
c73de88997
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user