mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Correct highlighting of messages with myCall and 73
This commit is contained in:
parent
5c1b7a8d8f
commit
5c09e55351
@ -414,19 +414,6 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con
|
||||
else
|
||||
{
|
||||
if (bCQonly) return;
|
||||
if (myCall.size ())
|
||||
{
|
||||
QString regexp {"[ <]" + myCall + "[ >]"};
|
||||
if (Radio::is_compound_callsign (myCall))
|
||||
{
|
||||
regexp = "(?:" + regexp + "|[ <]" + Radio::base_callsign (myCall) + "[ >])";
|
||||
}
|
||||
if ((decodedText.clean_string () + " ").contains (QRegularExpression {regexp}))
|
||||
{
|
||||
highlight_types types {Highlight::MyCall};
|
||||
set_colours (m_config, &bg, &fg, types);
|
||||
}
|
||||
}
|
||||
}
|
||||
auto message = decodedText.string();
|
||||
QString dxCall;
|
||||
@ -473,6 +460,20 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con
|
||||
message = leftJustifyAppendage (message, extra);
|
||||
}
|
||||
|
||||
if (myCall.size ())
|
||||
{
|
||||
QString regexp {"[ <]" + myCall + "[ >]"};
|
||||
if (Radio::is_compound_callsign (myCall))
|
||||
{
|
||||
regexp = "(?:" + regexp + "|[ <]" + Radio::base_callsign (myCall) + "[ >])";
|
||||
}
|
||||
if ((decodedText.clean_string () + " ").contains (QRegularExpression {regexp}))
|
||||
{
|
||||
highlight_types types {Highlight::MyCall};
|
||||
set_colours (m_config, &bg, &fg, types);
|
||||
}
|
||||
}
|
||||
|
||||
appendText (message.trimmed (), bg, fg, decodedText.call (), dxCall);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user