From 314a95c3c8a8e3b0b3d136167440b80f713ec3b7 Mon Sep 17 00:00:00 2001 From: vsonnier Date: Thu, 30 Jun 2016 19:48:04 +0200 Subject: [PATCH] FOCUS: Force center of main Waterfall/Spectrum on active demod on session load --- src/AppFrame.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index c505ec1..3ef14d2 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -1294,6 +1294,7 @@ void AppFrame::OnIdle(wxIdleEvent& event) { demodWaterfallCanvas->setCenterFrequency(centerFreq); demodSpectrumCanvas->setCenterFrequency(centerFreq); } + std::string dSelection = demodModeSelector->getSelectionLabel(); #ifdef ENABLE_DIGITAL_LAB std::string dSelectionadv = demodModeSelectorAdv->getSelectionLabel(); @@ -1811,6 +1812,13 @@ bool AppFrame::loadSession(std::string fileName) { if (focusDemod) { wxGetApp().bindDemodulators(&demodsLoaded); wxGetApp().getDemodMgr().setActiveDemodulator(focusDemod, false); + + long long focusCenterFreq = focusDemod->getFrequency(); + //on loading, force center of the main Waterfall / Spectrum on the active demodulator: + waterfallCanvas->setCenterFrequency(focusCenterFreq); + spectrumCanvas->setCenterFrequency(focusCenterFreq); + + } } } catch (DataTypeMismatchException &e) {