mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 01:45:38 +08:00
Ref T348, updated utility functions in CSimConnectObject/CAircraftCfgEntriesList, also fixed bug that type need to be updated to probe setting when aircraft changes
Related: Ref T317 Ref T247 Ref T335
This commit is contained in:
@@ -52,6 +52,7 @@ namespace BlackSimPlugin
|
||||
{
|
||||
m_aircraft = aircraft;
|
||||
m_callsignByteArray = aircraft.getCallsignAsString().toLatin1();
|
||||
m_type = aircraft.isTerrainProbe() ? TerrainProbe : Aircraft;
|
||||
}
|
||||
|
||||
void CSimConnectObject::setAircraftModelString(const QString &modelString)
|
||||
@@ -327,6 +328,7 @@ namespace BlackSimPlugin
|
||||
|
||||
CSimConnectObject CSimConnectObjects::getOldestObject() const
|
||||
{
|
||||
if (this->isEmpty()) { return CSimConnectObject(); }
|
||||
CSimConnectObject oldestSimObj = *this->begin();
|
||||
for (const CSimConnectObject &simObj : this->values())
|
||||
{
|
||||
|
||||
@@ -54,6 +54,9 @@ namespace BlackSimPlugin
|
||||
//! Get callsign
|
||||
const BlackMisc::Aviation::CCallsign &getCallsign() const { return m_aircraft.getCallsign(); }
|
||||
|
||||
//! Get callsign
|
||||
const QString &getCallsignAsString() const { return m_aircraft.getCallsign().asString(); }
|
||||
|
||||
//! Callsign?
|
||||
bool hasCallsign() const { return !this->getCallsign().isEmpty(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user