Fixed updates of view when simulated aircraft values are updated.

* renamed view to simulated aircraft view
* utility function for bool -> on/off
This commit is contained in:
Klaus Basan
2015-03-19 03:39:33 +01:00
parent 066515fb9b
commit a50e45e451
9 changed files with 69 additions and 38 deletions

View File

@@ -521,7 +521,8 @@ namespace BlackCore
bool c = this->m_airspace->updateAircraftEnabled(callsign, enabledForRedering, originator);
if (c)
{
emit this->changedAircraftEnabled(this->remoteAircraft().findFirstByCallsign(callsign), originator);
CSimulatedAircraft aircraft(this->remoteAircraft().findFirstByCallsign(callsign));
emit this->changedAircraftEnabled(aircraft, originator);
}
return c;
}
@@ -532,7 +533,8 @@ namespace BlackCore
bool c = this->m_airspace->updateAircraftModel(callsign, model, originator);
if (c)
{
emit this->changedRenderedAircraftModel(this->remoteAircraft().findFirstByCallsign(callsign), originator);
CSimulatedAircraft aircraft(this->remoteAircraft().findFirstByCallsign(callsign));
emit this->changedRenderedAircraftModel(aircraft, originator);
}
return c;
}
@@ -543,7 +545,9 @@ namespace BlackCore
bool c = this->m_airspace->updateFastPositionUpdates(callsign, enableFastPositonUpdates, originator);
if (c)
{
emit this->changedFastPositionUpdates(this->remoteAircraft().findFirstByCallsign(callsign), originator);
CSimulatedAircraft aircraft(this->remoteAircraft().findFirstByCallsign(callsign));
CLogMessage(this).info("Callsign %1 sets fast positions ") << aircraft.getCallsign() << BlackMisc::boolToOnOff(aircraft.fastPositionUpdates());
emit this->changedFastPositionUpdates(aircraft, originator);
}
return c;
}