diff --git a/src/AppFrame.cpp b/src/AppFrame.cpp index 04344a4..3aedb21 100644 --- a/src/AppFrame.cpp +++ b/src/AppFrame.cpp @@ -1189,6 +1189,7 @@ void AppFrame::OnIdle(wxIdleEvent& event) { if (demod != activeDemodulator) { demodSignalMeter->setInputValue(demod->getSquelchLevel()); demodGainMeter->setInputValue(demod->getGain()); + wxGetApp().getDemodMgr().setLastGain(demod->getGain()); int outputDevice = demod->getOutputDevice(); scopeCanvas->setDeviceName(outputDevices[outputDevice].name); outputDeviceMenuItems[outputDevice]->Check(true); @@ -1848,6 +1849,7 @@ int AppFrame::OnGlobalKeyDown(wxKeyEvent &event) { wxGetApp().getDemodMgr().setActiveDemodulator(nullptr); wxGetApp().getDemodMgr().setActiveDemodulator(demod, false); } + return 1; break; default: break; diff --git a/src/demod/DemodulatorInstance.cpp b/src/demod/DemodulatorInstance.cpp index 4f145b8..32e8232 100644 --- a/src/demod/DemodulatorInstance.cpp +++ b/src/demod/DemodulatorInstance.cpp @@ -359,7 +359,6 @@ int DemodulatorInstance::getAudioSampleRate() { void DemodulatorInstance::setGain(float gain_in) { currentAudioGain = gain_in; audioThread->setGain(gain_in); - wxGetApp().getDemodMgr().setLastGain(gain_in); } float DemodulatorInstance::getGain() {