From 93db29d50af08c1fb1ff148aaa0dc38c9356c0c0 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Mon, 1 Jun 2020 16:09:21 +0100 Subject: [PATCH] Highlight Callsign with f/g & b/g invalid restores highlighting Using a Highlight Callsign UDP message with `Highlight last` false and specifying both f/g and b/g colours as invalid now resets the highlighting on any matching callsign, as well as removing the decode highlighting internal record. --- widgets/displaytext.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/widgets/displaytext.cpp b/widgets/displaytext.cpp index b3ccf8eb2..ae865bc9d 100644 --- a/widgets/displaytext.cpp +++ b/widgets/displaytext.cpp @@ -608,9 +608,12 @@ void DisplayText::highlight_callsign (QString const& callsign, QColor const& bg, } } } - else if (pos != highlighted_calls_.end ()) + else { - highlighted_calls_.erase (pos); + if (pos != highlighted_calls_.end ()) + { + highlighted_calls_.erase (pos); + } QTextCursor cursor {document ()}; while (!cursor.isNull ()) {