mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
refs #748, fixed airport entity and reader resolution
This commit is contained in:
@@ -708,6 +708,9 @@ namespace BlackCore
|
||||
{
|
||||
case CWebReaderFlags::IcaoDataReader: return this->m_icaoDataReader;
|
||||
case CWebReaderFlags::ModelReader: return this->m_modelDataReader;
|
||||
case CWebReaderFlags::AirportReader: return this->m_airportDataReader;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,11 @@ namespace BlackCore
|
||||
f |= ModelReader;
|
||||
}
|
||||
|
||||
if (entity.testFlag(CEntityFlags::AirportEntity))
|
||||
{
|
||||
f |= AirportReader;
|
||||
}
|
||||
|
||||
if (entity.testFlag(CEntityFlags::InfoObjectEntity)) { f |= InfoDataReader; }
|
||||
if (entity.testFlag(CEntityFlags::BookingEntity)) { f |= VatsimBookingReader; }
|
||||
if (entity.testFlag(CEntityFlags::VatsimDataFile)) { f |= VatsimDataReader; }
|
||||
|
||||
@@ -135,6 +135,7 @@ namespace BlackMisc
|
||||
bool CEntityFlags::anySwiftDbEntity(Entity entities)
|
||||
{
|
||||
return
|
||||
entities.testFlag(AirportEntity) ||
|
||||
entities.testFlag(AircraftIcaoEntity) || entities.testFlag(AirlineIcaoEntity) ||
|
||||
entities.testFlag(CountryEntity) || entities.testFlag(DistributorEntity) ||
|
||||
entities.testFlag(ModelEntity) || entities.testFlag(LiveryEntity);
|
||||
@@ -144,6 +145,7 @@ namespace BlackMisc
|
||||
{
|
||||
if (name.contains("aircraft", Qt::CaseInsensitive)) { return AircraftIcaoEntity; }
|
||||
if (name.contains("airline", Qt::CaseInsensitive)) { return AirlineIcaoEntity; }
|
||||
if (name.contains("airport", Qt::CaseInsensitive)) { return AirportEntity; }
|
||||
if (name.contains("distributor", Qt::CaseInsensitive)) { return DistributorEntity; }
|
||||
if (name.contains("countr", Qt::CaseInsensitive)) { return CountryEntity; }
|
||||
if (name.contains("model", Qt::CaseInsensitive)) { return ModelEntity; }
|
||||
|
||||
Reference in New Issue
Block a user