mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-12-24 11:40:31 -05:00
Ensure band/frequency combo box edit styling tracks current frequency
This commit is contained in:
parent
1d52daf7ee
commit
db6a432a33
@ -2197,7 +2197,7 @@ void MainWindow::displayDialFrequency ()
|
|||||||
{
|
{
|
||||||
// only change this when necessary as we get called a lot and it
|
// only change this when necessary as we get called a lot and it
|
||||||
// would trash any user input to the band combo box line edit
|
// would trash any user input to the band combo box line edit
|
||||||
ui->bandComboBox->setCurrentText (band_name);
|
ui->bandComboBox->setCurrentText (band_name.size () ? band_name : m_config.bands ()->oob ());
|
||||||
m_wideGraph->setRxBand (band_name);
|
m_wideGraph->setRxBand (band_name);
|
||||||
m_lastBand = band_name;
|
m_lastBand = band_name;
|
||||||
band_changed(dial_frequency);
|
band_changed(dial_frequency);
|
||||||
@ -6696,17 +6696,20 @@ void MainWindow::on_bandComboBox_currentIndexChanged (int index)
|
|||||||
|
|
||||||
// Lookup band
|
// Lookup band
|
||||||
auto const& band = m_config.bands ()->find (frequency);
|
auto const& band = m_config.bands ()->find (frequency);
|
||||||
if (!band.isEmpty ())
|
ui->bandComboBox->setCurrentText (band.size () ? band : m_config.bands ()->oob ());
|
||||||
|
displayDialFrequency ();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_bandComboBox_editTextChanged (QString const& text)
|
||||||
|
{
|
||||||
|
if (text.size () && m_config.bands ()->oob () != text)
|
||||||
{
|
{
|
||||||
ui->bandComboBox->lineEdit ()->setStyleSheet ({});
|
ui->bandComboBox->lineEdit ()->setStyleSheet ({});
|
||||||
ui->bandComboBox->setCurrentText (band);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ui->bandComboBox->lineEdit ()->setStyleSheet ("QLineEdit {color: yellow; background-color : red;}");
|
ui->bandComboBox->lineEdit ()->setStyleSheet ("QLineEdit {color: yellow; background-color : red;}");
|
||||||
ui->bandComboBox->setCurrentText (m_config.bands ()->oob ());
|
|
||||||
}
|
}
|
||||||
displayDialFrequency ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_bandComboBox_activated (int index)
|
void MainWindow::on_bandComboBox_activated (int index)
|
||||||
|
@ -236,6 +236,7 @@ private slots:
|
|||||||
, QString const& exchange_sent, QString const& exchange_rcvd
|
, QString const& exchange_sent, QString const& exchange_rcvd
|
||||||
, QString const& propmode, QByteArray const& ADIF);
|
, QString const& propmode, QByteArray const& ADIF);
|
||||||
void on_bandComboBox_currentIndexChanged (int index);
|
void on_bandComboBox_currentIndexChanged (int index);
|
||||||
|
void on_bandComboBox_editTextChanged (QString const& text);
|
||||||
void on_bandComboBox_activated (int index);
|
void on_bandComboBox_activated (int index);
|
||||||
void on_readFreq_clicked();
|
void on_readFreq_clicked();
|
||||||
void on_pbTxMode_clicked();
|
void on_pbTxMode_clicked();
|
||||||
|
Loading…
Reference in New Issue
Block a user