Use models from centralized model cache

* no copy needed
* cache is synchronized when loading models
This commit is contained in:
Klaus Basan
2019-04-21 22:54:10 +02:00
parent 5caea5ad9b
commit 599064fe6c
4 changed files with 17 additions and 4 deletions

View File

@@ -540,7 +540,7 @@ namespace BlackSimPlugin
QList<Prefix> packages;
Q_ASSERT(isConnected());
const CAircraftModelList models = m_modelSet.getThreadLocal();
const CAircraftModelList models = this->getModelSet();
for (const auto &model : models)
{
const QString &modelFile = model.getFileName();

View File

@@ -235,7 +235,6 @@ namespace BlackSimPlugin
QTimer m_airportUpdater;
QTimer m_pendingAddedTimer;
BlackMisc::Aviation::CAirportList m_airportsInRange; //!< aiports in range of own aircraft
BlackMisc::CData<BlackMisc::Simulation::Data::TModelSetCacheXP> m_modelSet { this }; //!< XPlane model set
BlackMisc::Simulation::CSimulatedAircraftList m_pendingToBeAddedAircraft; //!< aircraft to be added
QHash<BlackMisc::Aviation::CCallsign, qint64> m_addingInProgressAircraft; //!< aircraft just adding
BlackMisc::Simulation::CSimulatedAircraftList m_aircraftAddedFailed; //! aircraft for which adding failed