mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 15:25:35 +08:00
Ref T259, Ref T243 setSimulationEnvironmentProvider when simulator changes
This commit is contained in:
@@ -456,7 +456,7 @@ namespace BlackCore
|
||||
sim->disconnect(this);
|
||||
sim->unload();
|
||||
sim->deleteLater();
|
||||
emit simulatorPluginChanged(CSimulatorPluginInfo());
|
||||
emit this->simulatorPluginChanged(CSimulatorPluginInfo());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -475,7 +475,7 @@ namespace BlackCore
|
||||
CStatusMessageList *pMatchingMessages = m_enableMatchingMessages ? &matchingMessages : nullptr;
|
||||
const CAircraftModel aircraftModel = m_aircraftMatcher.getClosestMatch(remoteAircraft, pMatchingMessages);
|
||||
Q_ASSERT_X(remoteAircraft.getCallsign() == aircraftModel.getCallsign(), Q_FUNC_INFO, "Mismatching callsigns");
|
||||
updateAircraftModel(callsign, aircraftModel, identifier());
|
||||
this->updateAircraftModel(callsign, aircraftModel, identifier());
|
||||
const CSimulatedAircraft aircraftAfterModelApplied = getAircraftInRangeForCallsign(remoteAircraft.getCallsign());
|
||||
m_simulatorPlugin.second->logicallyAddRemoteAircraft(aircraftAfterModelApplied);
|
||||
CMatchingUtils::addLogDetailsToList(pMatchingMessages, callsign, QString("Logically added remote aircraft: %1").arg(aircraftAfterModelApplied.toQString()));
|
||||
@@ -730,6 +730,12 @@ namespace BlackCore
|
||||
return false;
|
||||
}
|
||||
|
||||
ISimulator *CContextSimulator::simulator() const
|
||||
{
|
||||
if (!this->isSimulatorAvailable()) { return nullptr; }
|
||||
return m_simulatorPlugin.second;
|
||||
}
|
||||
|
||||
void CContextSimulator::highlightAircraft(const CSimulatedAircraft &aircraftToHighlight, bool enableHighlight, const CTime &displayTime)
|
||||
{
|
||||
if (m_debugEnabled) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO << aircraftToHighlight << enableHighlight << displayTime; }
|
||||
|
||||
Reference in New Issue
Block a user