mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 12:55:31 +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);
|
this->setObjectInfo(simulator);
|
||||||
|
|
||||||
// first connect is an internal connection to log info about load status
|
// 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_caches, &IMultiSimulatorModelCaches::cacheChanged, this, &IAircraftModelLoader::onCacheChanged);
|
||||||
connect(&m_settings, &CMultiSimulatorSettings::settingsChanged, this, &IAircraftModelLoader::onSettingsChanged);
|
connect(&m_settings, &CMultiSimulatorSettings::settingsChanged, this, &IAircraftModelLoader::onSettingsChanged);
|
||||||
}
|
}
|
||||||
@@ -141,13 +141,14 @@ namespace BlackMisc
|
|||||||
|
|
||||||
void IAircraftModelLoader::onCacheChanged(const CSimulatorInfo &simInfo)
|
void IAircraftModelLoader::onCacheChanged(const CSimulatorInfo &simInfo)
|
||||||
{
|
{
|
||||||
static const CStatusMessage status(this, CStatusMessage::SeverityInfo, "Cached changed");
|
// this detects a loaded cache elsewhere
|
||||||
emit this->loadingFinished(status, simInfo, CacheLoaded);
|
Q_UNUSED(simInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IAircraftModelLoader::onSettingsChanged(const CSimulatorInfo &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
|
QStringList IAircraftModelLoader::getInitializedModelDirectories(const QStringList &modelDirectories, const CSimulatorInfo &simulator) const
|
||||||
|
|||||||
@@ -191,11 +191,9 @@ namespace BlackMisc
|
|||||||
|
|
||||||
signals:
|
signals:
|
||||||
//! Parsing is finished or cache has been loaded
|
//! Parsing is finished or cache has been loaded
|
||||||
|
//! \remark does to fire if the cache has been changed elsewhere and it has just been reloaded here!
|
||||||
void loadingFinished(const CStatusMessageList &status, const CSimulatorInfo &simulator, LoadFinishedInfo info);
|
void loadingFinished(const CStatusMessageList &status, const CSimulatorInfo &simulator, LoadFinishedInfo info);
|
||||||
|
|
||||||
//! Corresponding Settings::CMultiSimulatorSettings::simulatorSettingsChange
|
|
||||||
void simulatorSettingsChanged(const CSimulatorInfo &simulator);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
IAircraftModelLoader(const CSimulatorInfo &simulator);
|
IAircraftModelLoader(const CSimulatorInfo &simulator);
|
||||||
|
|||||||
Reference in New Issue
Block a user