From c6882c7dad83993ab7c8db7d215e083bbf196907 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Thu, 22 Jan 2015 00:43:22 +0000 Subject: [PATCH] The +2kHz check box should not adjust the frequency when starting up Since the last monitored dial frequency is stored and restored from the settings the +2kHz setting should only set the state of the check box when initializing and not attempt to adjust the dial frequency. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx-1.4@4902 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 846b2b98f..093cfe671 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -2818,24 +2818,28 @@ void MainWindow::on_cbTxLock_clicked(bool checked) void MainWindow::on_cbPlus2kHz_toggled(bool checked) { - // Upload any queued spots before changing band - psk_Reporter->sendReport(); - m_plus2kHz = checked; - auto f = m_dialFreq; - - if (m_plus2kHz) + if (m_config.transceiver_online (false)) // only update state if not + // starting up { - f += 2000; - } - else - { - f -= 2000; - } + // Upload any queued spots before changing band + psk_Reporter->sendReport(); - m_bandEdited = true; - band_changed (f); + auto f = m_dialFreq; + + if (m_plus2kHz) + { + f += 2000; + } + else + { + f -= 2000; + } + + m_bandEdited = true; + band_changed (f); + } } void MainWindow::handle_transceiver_update (Transceiver::TransceiverState s)