mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
Ref T246, model loader must not fire signal if cache is changed elsewhere
This commit is contained in:
@@ -37,7 +37,7 @@ namespace BlackMisc
|
||||
this->setObjectInfo(simulator);
|
||||
|
||||
// first connect is an internal connection to log info about load status
|
||||
connect(this, &IAircraftModelLoader::loadingFinished, this, &IAircraftModelLoader::onLoadingFinished);
|
||||
connect(this, &IAircraftModelLoader::loadingFinished, this, &IAircraftModelLoader::onLoadingFinished, Qt::QueuedConnection);
|
||||
connect(&m_caches, &IMultiSimulatorModelCaches::cacheChanged, this, &IAircraftModelLoader::onCacheChanged);
|
||||
connect(&m_settings, &CMultiSimulatorSettings::settingsChanged, this, &IAircraftModelLoader::onSettingsChanged);
|
||||
}
|
||||
@@ -141,13 +141,14 @@ namespace BlackMisc
|
||||
|
||||
void IAircraftModelLoader::onCacheChanged(const CSimulatorInfo &simInfo)
|
||||
{
|
||||
static const CStatusMessage status(this, CStatusMessage::SeverityInfo, "Cached changed");
|
||||
emit this->loadingFinished(status, simInfo, CacheLoaded);
|
||||
// this detects a loaded cache elsewhere
|
||||
Q_UNUSED(simInfo);
|
||||
}
|
||||
|
||||
void IAircraftModelLoader::onSettingsChanged(const CSimulatorInfo &simInfo)
|
||||
{
|
||||
emit this->simulatorSettingsChanged(simInfo);
|
||||
// this detects changed settings elsewhere
|
||||
Q_UNUSED(simInfo);
|
||||
}
|
||||
|
||||
QStringList IAircraftModelLoader::getInitializedModelDirectories(const QStringList &modelDirectories, const CSimulatorInfo &simulator) const
|
||||
|
||||
Reference in New Issue
Block a user