mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 00:25:35 +08:00
Ref T650, using FSX SimulatedObject type decrease exeption counter when successfully added
* normally adding the SimObject fails first, * then the workaround is used (but exception counter is 1) * this means a 2nd time the object cannot be changed, as there is already a counter number > 0
This commit is contained in:
@@ -250,6 +250,9 @@ namespace BlackSimPlugin
|
|||||||
//! Increase adding exception
|
//! Increase adding exception
|
||||||
void increaseAddingExceptions() { m_addingExceptions++; }
|
void increaseAddingExceptions() { m_addingExceptions++; }
|
||||||
|
|
||||||
|
//! Decrease adding exception
|
||||||
|
void decreaseAddingExceptions() { if (m_addingExceptions > 0) { m_addingExceptions--; } ; }
|
||||||
|
|
||||||
//! Adding and directly removed
|
//! Adding and directly removed
|
||||||
int getAddingDirectlyRemoved() const { return m_addingDirectlyRemoved; }
|
int getAddingDirectlyRemoved() const { return m_addingDirectlyRemoved; }
|
||||||
|
|
||||||
|
|||||||
@@ -1006,9 +1006,9 @@ namespace BlackSimPlugin
|
|||||||
|
|
||||||
if (simObject.isConfirmedAdded() && simObject.getType() == CSimConnectObject::AircraftSimulatedObject)
|
if (simObject.isConfirmedAdded() && simObject.getType() == CSimConnectObject::AircraftSimulatedObject)
|
||||||
{
|
{
|
||||||
const CStatusMessage soMsg = CLogMessage(this).warning(u"Confirm added model '%1' '%2', but as '%3'") << remoteAircraft.getCallsignAsString() << remoteAircraft.getModelString() << simObject.getTypeAsString();
|
CLogMessage(this).warning(u"Confirm added model '%1' '%2', but as '%3'") << remoteAircraft.getCallsignAsString() << remoteAircraft.getModelString() << simObject.getTypeAsString();
|
||||||
this->triggerAutoTraceSendId(); // trace for some time (issues regarding this workaround)
|
this->triggerAutoTraceSendId(); // trace for some time (issues regarding this workaround?)
|
||||||
Q_UNUSED(soMsg);
|
simObject.decreaseAddingExceptions(); // if previously increased and now working, reset
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (false);
|
while (false);
|
||||||
|
|||||||
Reference in New Issue
Block a user