diff --git a/widgets/displaytext.cpp b/widgets/displaytext.cpp index 147255c91..3d0db7087 100644 --- a/widgets/displaytext.cpp +++ b/widgets/displaytext.cpp @@ -567,11 +567,11 @@ void DisplayText::setHighlightedHoundText(QString t) { set_colours(m_config, &bg, &fg, types); // t is multiple lines of text, each line is a hound calling // iterate through each line and highlight the callsign - auto lines = t.split(QChar('\n'), Qt::SkipEmptyParts); + auto lines = t.split(QChar('\n'), SkipEmptyParts); clear(); foreach (auto line, lines) { - auto fields = line.split(QChar(' '), Qt::SkipEmptyParts); + auto fields = line.split(QChar(' '), SkipEmptyParts); insertText(line, bg, fg, fields.first(), QString{}); } } diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 60505e991..20dd85399 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -4007,16 +4007,22 @@ void MainWindow::queueActiveWindowHound2(QString line) { // houndcall rpt grid if (w[7].contains(grid_regexp)) grid = w[7]; if (w[7].contains(non_r_db_regexp)) { - LOG_INFO(QString("%1 called with signal report %2").arg(caller).arg(w[7])); + LOG_INFO(QString("ActiveStations Window click: %1 called with signal report %2").arg(caller).arg(w[7])); } if (caller.length() > 2) { // make sure it's not already in the queue for ( QString hs : m_houndQueue) { if (hs.startsWith(caller)) { - LOG_INFO(QString("%1 already in queue. Skipping").arg(hs)); + //LOG_INFO(QString("ActiveStations Window click: %1 already in queue. Skipping").arg(hs)); return; } } + // make sure caller is not in fox queue either + if(m_foxQSO.contains(caller)) { + //LOG_INFO(QString("ActiveStations Window click: %1 already in progress. Skipping").arg(caller)); + return; + } + QString caller_rpt = (caller+" ").mid(0,12)+db; if (m_houndQueue.count() < MAX_HOUNDS_IN_QUEUE) { // add it to the queue @@ -4024,9 +4030,10 @@ void MainWindow::queueActiveWindowHound2(QString line) { refreshHoundQueueDisplay(); // TODO: remove from active stations window too? } + removeHoundFromCallingList(caller); } } else { - LOG_INFO(QString("queueActiveWindowHound2 - skipping %1").arg(line)); + LOG_INFO(QString("ActiveStations Window click: skipping %1").arg(line)); } } } @@ -4637,7 +4644,7 @@ void MainWindow::auto_sequence (DecodedText const& message, unsigned start_toler } if (m_auto && (m_QSOProgress==REPLYING or (!ui->tx1->isEnabled () and m_QSOProgress==REPORT)) - && qAbs (ui->TxFreqSpinBox->value () - df) <= int (stop_tolerance) + && !m_config.superFox() && (SpecOp::HOUND != m_specOp) && qAbs (ui->TxFreqSpinBox->value () - df) <= int (stop_tolerance) // && message_words.at (2) != "DE" && !message_words.at (2).contains (QRegularExpression {"(^(CQ|QRZ))|" + m_baseCall}) && message_words.at (3).contains (Radio::base_callsign (ui->dxCallEntry->text ()))) { @@ -10306,6 +10313,17 @@ QString MainWindow::sortHoundCalls(QString t, int isort, int max_dB) return m_houndCallers; } +void MainWindow::removeHoundFromCallingList(QString callsign) +{ + QString text = m_houndCallers; + QRegularExpression re = QRegularExpression("^" + callsign + "[^\\n]+\\n", QRegularExpression::MultilineOption); + text.remove(re); + if (text != m_houndCallers) { + m_nSortedHounds--; + m_houndCallers = text; + ui->decodedTextBrowser->setHighlightedHoundText(m_houndCallers); + } +} //------------------------------------------------------------------------------ void MainWindow::selectHound(QString line, bool bTopQueue) { diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 472c8523b..60e0b4abc 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -876,6 +876,7 @@ private: QChar current_submode () const; // returns QChar {0} if submode is not appropriate void write_transmit_entry (QString const& file_name); void selectHound(QString t, bool bTopQueue); + void removeHoundFromCallingList(QString callsign); void houndCallers(); void updateFoxQSOsInProgressDisplay(); void foxQueueTopCallCommand(); diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index 455ebdb2d..11e58630a 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -2348,7 +2348,7 @@ Double-click to reset to the standard 73 message Random - 5 + 8