From 764e2f95d5ec9ea303a10099c8024269de4e44b8 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 4 Feb 2016 17:30:04 +0000 Subject: [PATCH] Fix up message generation when short messages are used and decoded. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6466 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- decodedtext.cpp | 2 +- mainwindow.cpp | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/decodedtext.cpp b/decodedtext.cpp index a6bb57510..580d8ac2b 100644 --- a/decodedtext.cpp +++ b/decodedtext.cpp @@ -133,7 +133,7 @@ void DecodedText::deCallAndGrid(/*out*/QString& call, QString& grid) call = msg.mid(i1+1); int i2 = call.indexOf(" "); grid = call.mid(i2+1,4); - call = call.mid(0,i2); + call = call.mid(0,i2).replace(">",""); } int DecodedText::timeInSeconds() diff --git a/mainwindow.cpp b/mainwindow.cpp index f8e504eac..375abb8d7 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -2920,12 +2920,20 @@ void MainWindow::processMessage(QString const& messages, int position, bool ctrl m_hisGrid = ui->dxGridEntry->text(); QString rpt = decodedtext.report(); - ui->rptSpinBox->setValue(rpt.toInt()); + int n=rpt.toInt(); + if(m_mode=="JTMSK" and m_bShMsgs) { + n=26; + if(rpt.toInt()>4) n=27; + if(rpt.toInt()>8) n=28; + rpt=QString::number(n); + } + ui->rptSpinBox->setValue(n); genStdMsgs(rpt); // Determine appropriate response to received message auto dtext = " " + decodedtext.string () + " "; if(dtext.contains (" " + m_baseCall + " ") + || dtext.contains ("<" + m_baseCall + " ") || dtext.contains ("/" + m_baseCall + " ") || dtext.contains (" " + m_baseCall + "/") || (firstcall == "DE" && ((t4.size () > 7 && t4.at(7) != "73") || t4.size () <= 7)))