mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-05 09:45:44 +08:00
refs #315 Fixed inverted logic in own aircraft context update slots
This commit is contained in:
@@ -123,7 +123,7 @@ namespace BlackCore
|
|||||||
bool CContextOwnAircraft::updateOwnPosition(const BlackMisc::Geo::CCoordinateGeodetic &position, const BlackMisc::Aviation::CAltitude &altitude, const QString &originator)
|
bool CContextOwnAircraft::updateOwnPosition(const BlackMisc::Geo::CCoordinateGeodetic &position, const BlackMisc::Aviation::CAltitude &altitude, const QString &originator)
|
||||||
{
|
{
|
||||||
if (this->getRuntime()->isSlotLogForOwnAircraftEnabled()) this->getRuntime()->logSlot(Q_FUNC_INFO, position.toQString(), altitude.toQString(), originator);
|
if (this->getRuntime()->isSlotLogForOwnAircraftEnabled()) this->getRuntime()->logSlot(Q_FUNC_INFO, position.toQString(), altitude.toQString(), originator);
|
||||||
bool changed = (this->m_ownAircraft.getPosition() == position);
|
bool changed = (this->m_ownAircraft.getPosition() != position);
|
||||||
if (changed) this->m_ownAircraft.setPosition(position);
|
if (changed) this->m_ownAircraft.setPosition(position);
|
||||||
|
|
||||||
if (this->m_ownAircraft.getAltitude() != altitude)
|
if (this->m_ownAircraft.getAltitude() != altitude)
|
||||||
@@ -146,7 +146,7 @@ namespace BlackCore
|
|||||||
bool CContextOwnAircraft::updateOwnSituation(const BlackMisc::Aviation::CAircraftSituation &situation, const QString &originator)
|
bool CContextOwnAircraft::updateOwnSituation(const BlackMisc::Aviation::CAircraftSituation &situation, const QString &originator)
|
||||||
{
|
{
|
||||||
if (this->getRuntime()->isSlotLogForOwnAircraftEnabled()) this->getRuntime()->logSlot(Q_FUNC_INFO, situation.toQString());
|
if (this->getRuntime()->isSlotLogForOwnAircraftEnabled()) this->getRuntime()->logSlot(Q_FUNC_INFO, situation.toQString());
|
||||||
bool changed = this->m_ownAircraft.getSituation() == situation;
|
bool changed = this->m_ownAircraft.getSituation() != situation;
|
||||||
if (!changed) return changed;
|
if (!changed) return changed;
|
||||||
|
|
||||||
if (changed)
|
if (changed)
|
||||||
|
|||||||
Reference in New Issue
Block a user