mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2025-09-16 05:27:52 -04:00
FOCUS: Force center of main Waterfall/Spectrum on active demod on session load
This commit is contained in:
parent
cf90a829b0
commit
314a95c3c8
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user