Fix #565, Solo mode is now saved into session files

This commit is contained in:
vsonnier 2017-08-12 18:09:36 +02:00
parent ae74023864
commit 33107bfa9e

View File

@ -2026,6 +2026,7 @@ void AppFrame::saveSession(std::string fileName) {
*header->newChild("center_freq") = wxGetApp().getFrequency();
*header->newChild("sample_rate") = wxGetApp().getSampleRate();
*header->newChild("solo_mode") = wxGetApp().getSoloMode()?1:0;
if (waterfallCanvas->getViewState()) {
DataNode *viewState = header->newChild("view_state");
@ -2143,6 +2144,16 @@ bool AppFrame::loadSession(std::string fileName) {
}
}
if (header->hasAnother("solo_mode")) {
int solo_mode_activated = *header->getNext("solo_mode");
wxGetApp().setSoloMode((solo_mode_activated > 0) ? true : false);
}
else {
wxGetApp().setSoloMode(false);
}
DemodulatorInstance *loadedActiveDemod = nullptr;
DemodulatorInstance *newDemod = nullptr;