diff --git a/src/blackcore/context/contextsimulatorimpl.cpp b/src/blackcore/context/contextsimulatorimpl.cpp index cf5f5157e..c2deea242 100644 --- a/src/blackcore/context/contextsimulatorimpl.cpp +++ b/src/blackcore/context/contextsimulatorimpl.cpp @@ -1044,10 +1044,16 @@ namespace BlackCore { CSimulatedAircraft aircraft = this->getAircraftInRangeForCallsign(callsign); if (aircraft.getCallsign() != callsign) { return false; } // not found - this->setAircraftEnabledFlag(callsign, true); // plain vanilla flag - this->updateAircraftRendered(callsign, false); // this is flag only anyway + if (!this->isSimulatorAvailable()) { return false; } + + m_simulatorPlugin.second->logicallyRemoveRemoteAircraft(callsign); aircraft.setModel(aircraft.getNetworkModel()); // like originally from network - this->xCtxAddedRemoteAircraftReadyForModelMatching(aircraft); + QPointer myself(this); + QTimer::singleShot(1000, this, [ = ] + { + if (!sApp || sApp->isShuttingDown() || !myself) { return; } + this->xCtxAddedRemoteAircraftReadyForModelMatching(aircraft); + }); return true; } diff --git a/src/blackcore/simulator.cpp b/src/blackcore/simulator.cpp index bf76e452c..ea7d1f03e 100644 --- a/src/blackcore/simulator.cpp +++ b/src/blackcore/simulator.cpp @@ -1082,7 +1082,18 @@ namespace BlackCore const CCallsign callsign = aircraft.getCallsign(); if (!this->isPhysicallyRenderedAircraft(callsign)) { return false; } this->physicallyRemoveRemoteAircraft(callsign); - return this->changeRemoteAircraftEnabled(aircraft); + // return this->changeRemoteAircraftEnabled(aircraft); + + const QPointer myself(this); + QTimer::singleShot(1000, this, [ = ] + { + if (!myself) { return; } + if (this->isAircraftInRange(callsign)) + { + this->changeRemoteAircraftEnabled(aircraft); + } + }); + return true; } CStatusMessageList ISimulator::debugVerifyStateAfterAllAircraftRemoved() const diff --git a/src/blackgui/components/mappingcomponent.cpp b/src/blackgui/components/mappingcomponent.cpp index f7285d38d..4b4a8a564 100644 --- a/src/blackgui/components/mappingcomponent.cpp +++ b/src/blackgui/components/mappingcomponent.cpp @@ -331,7 +331,7 @@ namespace BlackGui const QString modelString = ui->completer_ModelStrings->getModelString(); if (modelString.isEmpty()) { - this->showOverlayMessage(CStatusMessage(this).validationError(u"Missing model for mapping"), OverlayMessageMs); + this->showOverlayHTMLMessage(CStatusMessage(this).validationError(u"Missing model for mapping"), OverlayMessageMs); return; } @@ -394,7 +394,7 @@ namespace BlackGui if (!changed) { - this->showOverlayMessage(CLogMessage(this).info(u"Model mapping, nothing to change"), OverlayMessageMs); + this->showOverlayHTMLMessage(CLogMessage(this).info(u"Model mapping, nothing to change"), OverlayMessageMs); } } @@ -405,9 +405,9 @@ namespace BlackGui if (callsign.isEmpty()) { return; } const bool reset = sGui->getIContextSimulator()->resetToModelMatchingAircraft(callsign); const CStatusMessage msg = reset ? - CStatusMessage(this).info(u"Model reset for '%1'") << callsign.toQString() : + CStatusMessage(this).info(u"Model reset for '%1'") << callsign.toQString() : CStatusMessage(this).info(u"Reset failed for '%1'") << callsign.toQString(); - this->showOverlayMessage(msg, 3000); + this->showOverlayHTMLMessage(msg, 3000); } void CMappingComponent::onModelPreviewChanged(int state) diff --git a/src/xswiftbus/traffic.cpp b/src/xswiftbus/traffic.cpp index e93182e77..596d5a2ac 100644 --- a/src/xswiftbus/traffic.cpp +++ b/src/xswiftbus/traffic.cpp @@ -550,6 +550,9 @@ namespace XSwiftBus const dbus_uint32_t serial = message.getSerial(); const bool wantsReply = message.wantsReply(); + // Debug message if needed + // { const std::string d = "dbusMessageHandler: " + message.getMethodName(); INFO_LOG(d.c_str()); } + if (message.getInterfaceName() == DBUS_INTERFACE_INTROSPECTABLE) { if (message.getMethodName() == "Introspect")