mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-01 21:45:00 -04:00
Handle my call highlighting when multiple calls with same base call
This commit is contained in:
+13
-11
@@ -413,17 +413,19 @@ void DisplayText::displayDecodedText(DecodedText const& decodedText, QString con
|
||||
else
|
||||
{
|
||||
if (bCQonly) return;
|
||||
if (myCall != "" && (decodedText.indexOf (" " + myCall + " ") >= 0
|
||||
or decodedText.indexOf (" " + myCall + "/") >= 0
|
||||
or decodedText.indexOf ("<" + myCall + "/") >= 0
|
||||
or decodedText.indexOf ("/" + myCall + " ") >= 0
|
||||
or decodedText.indexOf ("/" + myCall + ">") >= 0
|
||||
or decodedText.indexOf ("<" + myCall + " ") >= 0
|
||||
or decodedText.indexOf ("<" + myCall + ">") >= 0
|
||||
or decodedText.indexOf (" " + myCall + ">") >= 0)) {
|
||||
highlight_types types {Highlight::MyCall};
|
||||
set_colours (m_config, &bg, &fg, types);
|
||||
}
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user