From c7e7062b8aeef774efdb6155edb7ce619a900c6b Mon Sep 17 00:00:00 2001 From: Uwe Risse Date: Sat, 7 May 2022 18:35:43 +0200 Subject: [PATCH] Ensure that m_freqNominalPeriod and m_currentBandPeriod are also initialized when rig is none or when there was no band change. --- widgets/mainwindow.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index efcd089d9..6af1ebfd0 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -2278,6 +2278,11 @@ void MainWindow::displayDialFrequency () m_wideGraph->setRxBand (band_name); m_lastBand = band_name; band_changed(dial_frequency); + // prevent wrong frequencies for all.txt, PSK Reporter and highlighting for late decodes after band changes + QTimer::singleShot (4500, [=] { + m_freqNominalPeriod = m_freqNominal; + m_currentBandPeriod = m_currentBand; + }); } // search working frequencies for one we are within 10kHz of (1 Mhz @@ -7361,10 +7366,6 @@ void MainWindow::band_changed (Frequency f) } setRig (f); setXIT (ui->TxFreqSpinBox->value ()); - QTimer::singleShot (4500, [=] { // prevent wrong frequencies for all.txt and PSK Reporter after band changes - m_freqNominalPeriod = m_freqNominal; - m_currentBandPeriod = m_currentBand; - }); } }