From 28c5bfc1bd3220a13d50125ae7c22dfa7aa2d1a8 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Sat, 18 Jul 2020 14:47:20 +0100 Subject: [PATCH] Process double-clicks of Fox multi-caller replies correctly This change also ignores attempts to double-click other Hound calls. --- Decoder/decodedtext.cpp | 8 +++++++- widgets/mainwindow.cpp | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Decoder/decodedtext.cpp b/Decoder/decodedtext.cpp index e476ecb9b..04a5cc87e 100644 --- a/Decoder/decodedtext.cpp +++ b/Decoder/decodedtext.cpp @@ -165,7 +165,13 @@ QString DecodedText::call() const // get the second word, most likely the de call and the third word, most likely grid void DecodedText::deCallAndGrid(/*out*/QString& call, QString& grid) const { - auto const& match = words_re.match (message_); + auto msg = message_; + auto p = msg.indexOf ("; "); + if (p >= 0) + { + msg = msg.mid (p + 2); + } + auto const& match = words_re.match (msg); call = match.captured ("word2"); grid = match.captured ("word3"); if ("R" == grid) grid = match.captured ("word4"); diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index f54355842..d48266e57 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -4607,6 +4607,13 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie return; } + // ignore calls by other hounds + if (SpecOp::HOUND == m_config.special_op_id() + && message.messageWords ().indexOf (QRegularExpression {R"(R\+-[0-9]+)"}) >= 0) + { + return; + } + QString firstcall = message.call(); if(firstcall.length()==5 and firstcall.mid(0,3)=="CQ ") firstcall="CQ"; if(!m_bFastMode and (!m_config.enable_VHF_features() or m_mode=="FT8")) {