Fixed #124: similar callsigns shouldn't hightlight
This commit is contained in:
parent
f1ed44f9e9
commit
bb4b79d797
@ -1394,7 +1394,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|||||||
connect(historyAction, &QAction::triggered, this, [this](){
|
connect(historyAction, &QAction::triggered, this, [this](){
|
||||||
QString selectedCall = callsignSelected();
|
QString selectedCall = callsignSelected();
|
||||||
if(selectedCall.isEmpty()){
|
if(selectedCall.isEmpty()){
|
||||||
return;
|
selectedCall = "%";
|
||||||
}
|
}
|
||||||
|
|
||||||
Inbox inbox(inboxPath());
|
Inbox inbox(inboxPath());
|
||||||
@ -9317,7 +9317,11 @@ bool MainWindow::isMyCallIncluded(const QString &text){
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return text.contains(myCall);
|
if(!text.contains(myCall)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Varicode::parseCallsigns(text).contains(myCall);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MainWindow::isAllCallIncluded(const QString &text){
|
bool MainWindow::isAllCallIncluded(const QString &text){
|
||||||
@ -10944,8 +10948,7 @@ void MainWindow::displayBandActivity() {
|
|||||||
|
|
||||||
// TODO: jsherer - there's a potential here for a previous allcall to poison the highlight.
|
// TODO: jsherer - there's a potential here for a previous allcall to poison the highlight.
|
||||||
if (
|
if (
|
||||||
(isDirectedOffset(offset, &isDirectedAllCall) && !isDirectedAllCall) ||
|
(isDirectedOffset(offset, &isDirectedAllCall) && !isDirectedAllCall) || isMyCallIncluded(text.last())
|
||||||
(text.last().contains(Radio::base_callsign(m_config.my_callsign())))
|
|
||||||
) {
|
) {
|
||||||
offsetItem->setBackground(QBrush(m_config.color_MyCall()));
|
offsetItem->setBackground(QBrush(m_config.color_MyCall()));
|
||||||
tdriftItem->setBackground(QBrush(m_config.color_MyCall()));
|
tdriftItem->setBackground(QBrush(m_config.color_MyCall()));
|
||||||
|
Loading…
Reference in New Issue
Block a user