From b3f17051e7dfca8fff471d511bfd13b9653b9898 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Thu, 3 Apr 2014 21:55:51 +0000 Subject: [PATCH] Save the last used free text message between runs. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3982 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 5fa69f9b0..d6934f2f5 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -339,7 +339,6 @@ MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdme ui->labAz->setStyleSheet("border: 0px;"); ui->labDist->setStyleSheet("border: 0px;"); - //Band Settings readSettings(); //Restore user's setup params // start the audio thread @@ -452,6 +451,7 @@ void MainWindow::writeSettings() m_settings->setValue("DXcall",ui->dxCallEntry->text()); m_settings->setValue("DXgrid",ui->dxGridEntry->text()); m_settings->setValue ("AstroDisplayed", m_astroWidget && m_astroWidget->isVisible()); + m_settings->setValue ("FreeText", ui->freeTextMsg->currentText ()); m_settings->endGroup(); m_settings->beginGroup("Common"); @@ -487,6 +487,12 @@ void MainWindow::readSettings() m_txFirst = m_settings->value("TxFirst",false).toBool(); ui->txFirstCheckBox->setChecked(m_txFirst); auto displayAstro = m_settings->value ("AstroDisplayed", false).toBool (); + + if (m_settings->contains ("FreeText")) + { + ui->freeTextMsg->setCurrentText (m_settings->value ("FreeText").toString ()); + } + m_settings->endGroup(); // do this outside of settings group because it uses groups internally