Ref T528, fixed re-matching

* do not use getISimulator() in remote UI
* overlay message for re-matching
This commit is contained in:
Klaus Basan
2019-02-08 02:16:50 +01:00
committed by Mat Sutcliffe
parent 2031ba3d8b
commit b0f11362be

View File

@@ -315,9 +315,13 @@ namespace BlackGui
void CMappingComponent::doMatchingsAgain()
{
if (!sGui || !sGui->getIContextSimulator() || !sGui->getISimulator() || !sGui->getISimulator()->isConnected()) { return; }
if (!sGui || sGui->isShuttingDown() || !sGui->getIContextSimulator()) { return; }
if (!sGui->getIContextSimulator()->isSimulatorAvailable()) { return; }
const int rematchedNumber = sGui->getIContextSimulator()->doMatchingsAgain();
CLogMessage(this).info(u"Triggered re-matching of %1 aircraft") << rematchedNumber;
const QString info = QStringLiteral("Triggered re-matching of %1 aircraft").arg(rematchedNumber);
this->showOverlayHTMLMessage(info, 5000);
CLogMessage(this).info(info);
}
void CMappingComponent::onSaveAircraft()