Ensure that m_freqNominalPeriod and m_currentBandPeriod are also initialized when rig is none or when there was no band change.

This commit is contained in:
Uwe Risse 2022-05-07 18:35:43 +02:00
parent a6e6b91cee
commit c7e7062b8a
1 changed files with 5 additions and 4 deletions

View File

@ -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;
});
}
}