mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-24 07:55:35 +08:00
refs #793, added function to reset model (after it was manually changed)
* located in context since context owns matcher object * call from GUI * some code formatting to indicate the cross simulator slots connected in runtime refs #780
This commit is contained in:
@@ -483,7 +483,7 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
|
||||
void CContextSimulator::ps_addRemoteAircraft(const CSimulatedAircraft &remoteAircraft)
|
||||
void CContextSimulator::ps_addedRemoteAircraft(const CSimulatedAircraft &remoteAircraft)
|
||||
{
|
||||
if (!isSimulatorSimulating()) { return; }
|
||||
Q_ASSERT(!remoteAircraft.getCallsign().isEmpty());
|
||||
@@ -522,7 +522,7 @@ namespace BlackCore
|
||||
for (const CSimulatedAircraft &simulatedAircraft : aircrafts)
|
||||
{
|
||||
Q_ASSERT(!simulatedAircraft.getCallsign().isEmpty());
|
||||
ps_addRemoteAircraft(simulatedAircraft);
|
||||
ps_addedRemoteAircraft(simulatedAircraft);
|
||||
}
|
||||
m_initallyAddAircrafts = false;
|
||||
}
|
||||
@@ -653,6 +653,15 @@ namespace BlackCore
|
||||
m_simulatorPlugin.second->highlightAircraft(aircraftToHighlight, enableHighlight, displayTime);
|
||||
}
|
||||
|
||||
bool CContextSimulator::resetToModelMatchingAircraft(const CCallsign &callsign)
|
||||
{
|
||||
CSimulatedAircraft aircraft = getAircraftInRangeForCallsign(callsign);
|
||||
if (aircraft.getCallsign() != callsign) { return false; } // not found
|
||||
aircraft.setModel(aircraft.getNetworkModel());
|
||||
ps_addedRemoteAircraft(aircraft);
|
||||
return true;
|
||||
}
|
||||
|
||||
void CContextSimulator::requestWeatherGrid(const Weather::CWeatherGrid &weatherGrid, const CIdentifier &identifier)
|
||||
{
|
||||
if (m_debugEnabled) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO << identifier; }
|
||||
|
||||
Reference in New Issue
Block a user