Don't overwrite frequency, station or, macro models whenleaving the

configuration dialog unless they have changed.

Fix a bug I had introduced into the free text message fields so they
don't get overwritten by message generation.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3981 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2014-04-03 21:19:04 +00:00
parent 690fc66ca7
commit 4453a46664
2 changed files with 17 additions and 8 deletions

View File

@ -1396,12 +1396,24 @@ void Configuration::impl::accept ()
TX_messages_ = ui_->TX_messages_check_box->isChecked ();
data_mode_ = static_cast<DataMode> (ui_->TX_mode_button_group->checkedId ());
save_directory_ = ui_->save_path_display_label->text ();
macros_.setStringList (next_macros_.stringList ());
frequencies_ = next_frequencies_.frequencies ();
frequencies_.sort (0);
stations_ = next_stations_.stations ();
stations_.sort (0);
if (macros_.stringList () != next_macros_.stringList ())
{
macros_.setStringList (next_macros_.stringList ());
}
if (frequencies_.frequencies () != next_frequencies_.frequencies ())
{
frequencies_ = next_frequencies_.frequencies ();
frequencies_.sort (0);
}
if (stations_.stations () != next_stations_.stations ())
{
stations_ = next_stations_.stations ();
stations_.sort (0);
}
write_settings (); // make visible to all
QDialog::accept();

View File

@ -1959,7 +1959,6 @@ void MainWindow::genStdMsgs(QString rpt) //genStdMsgs()
msgtype(t, ui->tx6);
}
ui->genMsg->setText("");
ui->freeTextMsg->setCurrentText("");
return;
}
QString hisBase=baseCall(hisCall);
@ -2209,7 +2208,6 @@ void MainWindow::on_tx4_editingFinished() //tx4 edited
void MainWindow::on_tx5_currentTextChanged (QString const& text) //tx5 edited
{
msgtype(text, ui->tx5->lineEdit ());
msgtype(text, ui->freeTextMsg->lineEdit ());
}
void MainWindow::on_tx6_editingFinished() //tx6 edited
@ -2608,7 +2606,6 @@ void MainWindow::on_rbFreeText_toggled(bool checked)
void MainWindow::on_freeTextMsg_currentTextChanged (QString const& text)
{
msgtype(text, ui->freeTextMsg->lineEdit ());
msgtype(text, ui->tx5->lineEdit ());
}
void MainWindow::on_rptSpinBox_valueChanged(int n)