From 1542b7f8575ef99335be2083c28b2f93c4fe892d Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 11 Dec 2023 19:01:05 -0500 Subject: [PATCH] If myCall is in the message, highlight the line with red background. --- qmap/mainwindow.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/qmap/mainwindow.cpp b/qmap/mainwindow.cpp index 517692766..4bd0e0313 100644 --- a/qmap/mainwindow.cpp +++ b/qmap/mainwindow.cpp @@ -955,11 +955,9 @@ void MainWindow::guiUpdate() m_nline++; QTextCursor cursor(ui->decodedTextBrowser->document()->findBlockByLineNumber(m_nline-1)); QTextBlockFormat f = cursor.blockFormat(); - if(t.mid(36,2)=="30") { - f.setBackground(QBrush(Qt::yellow)); - } else { - f.setBackground(QBrush(Qt::white)); - } + f.setBackground(QBrush(Qt::white)); + if(t.mid(36,2)=="30") f.setBackground(QBrush(Qt::yellow)); + if(t.indexOf(m_myCall)>10) f.setBackground(QBrush(Qt::red)); cursor.setBlockFormat(f); } }