mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 05:28:09 +08:00
refs #533, fixes "CContextSimulator::ps_addRemoteAircraft is never called"
* reordered use of fireDelayedReadyForModelMatching * better calls / params depending on received packet(FSInn / Icao code) * fixed search in DB data * works now with and without DB data present
This commit is contained in:
@@ -142,6 +142,14 @@ namespace BlackMisc
|
||||
}
|
||||
}
|
||||
|
||||
bool CAircraftModel::canInitializeFromFsd() const
|
||||
{
|
||||
bool nw = this->getModelType() == CAircraftModel::TypeQueriedFromNetwork ||
|
||||
this->getModelType() == CAircraftModel::TypeFsdData ||
|
||||
this->getModelType() == CAircraftModel::TypeUnknown;
|
||||
return nw;
|
||||
}
|
||||
|
||||
int CAircraftModel::comparePropertyByIndex(const CAircraftModel &compareValue, const CPropertyIndex &index) const
|
||||
{
|
||||
if (IDatastoreObjectWithIntegerKey::canHandleIndex(index)) { return IDatastoreObjectWithIntegerKey::comparePropertyByIndex(compareValue, index);}
|
||||
|
||||
@@ -94,6 +94,9 @@ namespace BlackMisc
|
||||
//! \copydoc CValueObject::setPropertyByIndex
|
||||
void setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index);
|
||||
|
||||
//! Can be initialized from FSD
|
||||
bool canInitializeFromFsd() const;
|
||||
|
||||
//! Compare for index
|
||||
int comparePropertyByIndex(const CAircraftModel &compareValue, const CPropertyIndex &index) const;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace BlackMisc
|
||||
|
||||
CAircraftModel CAircraftModelList::findFirstByModelString(const QString &modelString, Qt::CaseSensitivity sensitivity) const
|
||||
{
|
||||
return this->findFirstBy([ = ](const CAircraftModel & model)
|
||||
return this->findFirstByOrDefault([ = ](const CAircraftModel & model)
|
||||
{
|
||||
return model.matchesModelString(modelString, sensitivity);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user