diff --git a/src/blackgui/components/modelmatcherlogcomponent.cpp b/src/blackgui/components/modelmatcherlogcomponent.cpp index 607ef681a..fcad93716 100644 --- a/src/blackgui/components/modelmatcherlogcomponent.cpp +++ b/src/blackgui/components/modelmatcherlogcomponent.cpp @@ -52,14 +52,20 @@ namespace BlackGui void CModelMatcherLogComponent::initGui() { - // avoid signal roundtrip - bool c = sGui->getIContextNetwork()->isReverseLookupMessagesEnabled(); - ui->cb_LogReverseLookup->setChecked(c); - if (sGui) { + // avoid signal roundtrips + bool c = sGui->getIContextNetwork()->isReverseLookupMessagesEnabled(); + if (c != ui->cb_LogReverseLookup->isChecked()) + { + ui->cb_LogReverseLookup->setChecked(c); + } + c = sGui->getIContextSimulator()->isMatchingMessagesEnabled(); - ui->cb_LogMatchingMessages->setChecked(c); + if (c != ui->cb_LogMatchingMessages->isChecked()) + { + ui->cb_LogMatchingMessages->setChecked(c); + } } } diff --git a/src/blackmisc/simulation/remoteaircraftprovider.cpp b/src/blackmisc/simulation/remoteaircraftprovider.cpp index dd71019a7..6ebd06c5a 100644 --- a/src/blackmisc/simulation/remoteaircraftprovider.cpp +++ b/src/blackmisc/simulation/remoteaircraftprovider.cpp @@ -152,10 +152,7 @@ namespace BlackMisc void CRemoteAircraftProvider::removeAllAircraft() { - for (const CCallsign &cs : this->getAircraftInRangeCallsigns()) - { - emit this->removedAircraft(cs); - } + const CCallsignSet callsigns = this->getAircraftInRangeCallsigns(); // locked members { @@ -182,6 +179,11 @@ namespace BlackMisc { QWriteLocker l(&m_lockPartsHistory); m_aircraftPartsMessages.clear(); } { QWriteLocker l(&m_lockMessages); m_reverseLookupMessages.clear(); } { QWriteLocker l(&m_lockAircraft); m_aircraftInRange.clear(); } + + for (const CCallsign &cs : callsigns) + { + emit this->removedAircraft(cs); + } } void CRemoteAircraftProvider::removeReverseLookupMessages(const CCallsign &callsign)