diff --git a/mainwindow.cpp b/mainwindow.cpp index a5fcdd51e..6a5590fa6 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1755,16 +1755,24 @@ void MainWindow::displayDialFrequency () ui->bandComboBox->setCurrentText (band_name); m_wideGraph->setRxBand (band_name); m_lastBand = band_name; - // For 60M we'll move the JT9 offset to zero + // For 60M we'll move the JT9 offset to zero and remember so we can restore static int saveRxRange = -1; - if (saveRxRange < 0) saveRxRange = m_wideGraph->Fmin(); + if (saveRxRange < 0) { + m_settings->beginGroup ("WideGraph"); + saveRxRange = m_settings->value ("FminSave", m_wideGraph->Fmin()).toInt (); + m_settings->endGroup(); + } if (band_name == "60m") { saveRxRange = m_wideGraph->Fmin(); - m_wideGraph->setRxRange(0); + // We need to remember our save value in case we restart on 60M + m_settings->beginGroup ("WideGraph"); + m_settings->setValue ("FminSave", saveRxRange); + m_settings->endGroup(); + m_wideGraph->setRxRangeAndSplitSpinBox(0); } else { - m_wideGraph->setRxRange(saveRxRange); + m_wideGraph->setRxRangeAndSplitSpinBox(saveRxRange); } } diff --git a/widegraph.cpp b/widegraph.cpp index b19ad3cb7..8b4e50639 100644 --- a/widegraph.cpp +++ b/widegraph.cpp @@ -312,6 +312,14 @@ void WideGraph::setRxRange(int fMin) //setRxRange ui->widePlot->update(); } +void WideGraph::setRxRangeAndSplitSpinBox(int fMin) +{ + // Need to ensure split box is set too + // e.g. For 60M we force the offset to 0 so this routine makes the split box match + // Otherwise we can't decode JT9 + ui->fSplitSpinBox->setValue(fMin); +} + int WideGraph::Fmin() //Fmin { return m_fMin; diff --git a/widegraph.h b/widegraph.h index ca7fb9cf8..aba5bd265 100644 --- a/widegraph.h +++ b/widegraph.h @@ -33,6 +33,7 @@ public: int fSpan(); void saveSettings(); void setRxRange(int fMin); + void setRxRangeAndSplitSpinBox(int fMin); void setFsample(int n); void setPeriod(int ntrperiod, int nsps); void setTxFreq(int n);