From 758921d65e341726a3c00c39ad720e628ff85f1c Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Wed, 24 Sep 2014 17:25:55 +0000 Subject: [PATCH] Ensure Plus 2kHz Check Box is disabled in Transmit when required. The Plus 2 kHz check box should not be enabled during transmit if the "Allow Tx Frequency Changes While Transmitting" is not checked. Also fixed a defect that caused the disabled during Tx state of some widgets to not clear due to transmit or tune period being shorter than a poll interval. Fixed by ensuring PTT changes are always signalled rather than waiting for the next poll. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4352 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- Configuration.cpp | 2 +- OmniRigTransceiver.cpp | 4 +++- TransceiverBase.cpp | 7 +++++++ mainwindow.cpp | 6 ++++-- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Configuration.cpp b/Configuration.cpp index 19e751e48..bb7efdf12 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -426,7 +426,7 @@ QString Configuration::my_grid () const {return m_->my_grid_;} QFont Configuration::decoded_text_font () const {return m_->decoded_text_font_;} qint32 Configuration::id_interval () const {return m_->id_interval_;} bool Configuration::id_after_73 () const {return m_->id_after_73_;} -bool Configuration::tx_QSY_allowed () const {return m_->tx_QSY_allowed_ || !split_mode ();} +bool Configuration::tx_QSY_allowed () const {return m_->tx_QSY_allowed_;} bool Configuration::spot_to_psk_reporter () const {return m_->spot_to_psk_reporter_;} bool Configuration::monitor_off_at_startup () const {return m_->monitor_off_at_startup_;} bool Configuration::log_as_RTTY () const {return m_->log_as_RTTY_;} diff --git a/OmniRigTransceiver.cpp b/OmniRigTransceiver.cpp index 2344cc0c5..85484a544 100644 --- a/OmniRigTransceiver.cpp +++ b/OmniRigTransceiver.cpp @@ -631,7 +631,9 @@ void OmniRigTransceiver::do_ptt (bool on) if (state ().ptt () != on) { update_PTT (on); - update_complete (); + + // no need for this as currently update_PTT() does it for us + // update_complete (); } } } diff --git a/TransceiverBase.cpp b/TransceiverBase.cpp index 78fa2a295..738ad7024 100644 --- a/TransceiverBase.cpp +++ b/TransceiverBase.cpp @@ -248,7 +248,14 @@ void TransceiverBase::update_mode (MODE m) void TransceiverBase::update_PTT (bool state) { + auto prior = m_->state_.ptt (); m_->state_.ptt (state); + if (state != prior) + { + // always signal PTT changes because some MainWindow logic + // depends on it + update_complete (); + } } void TransceiverBase::update_complete () diff --git a/mainwindow.cpp b/mainwindow.cpp index 0f782cb41..38d7d0e66 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -2987,7 +2987,7 @@ void MainWindow::transmitDisplay (bool transmitting) m_btxok=true; } - auto QSY_allowed = !transmitting || m_config.tx_QSY_allowed (); + auto QSY_allowed = !transmitting || m_config.tx_QSY_allowed () || !m_config.split_mode (); if (ui->cbTxLock->isChecked ()) { ui->RxFreqSpinBox->setEnabled (QSY_allowed); @@ -2996,7 +2996,9 @@ void MainWindow::transmitDisplay (bool transmitting) ui->TxFreqSpinBox->setEnabled (QSY_allowed); ui->pbR2T->setEnabled (QSY_allowed); ui->cbTxLock->setEnabled (QSY_allowed); - ui->cbPlus2kHz->setEnabled (QSY_allowed); + + // only allow +2kHz when not transmitting or if TX QSYs are allowed + ui->cbPlus2kHz->setEnabled (!transmitting || m_config.tx_QSY_allowed ()); // the following are always disallowed in transmit ui->menuMode->setEnabled (!transmitting);