mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-24 07:55:35 +08:00
Ref T28, do not change simulator selector when only cache update
This commit is contained in:
committed by
Mathew Sutcliffe
parent
9f4f06a436
commit
c9afc68309
@@ -445,7 +445,7 @@ namespace BlackGui
|
||||
this->m_modelLoader->startLoading(mode, static_cast<int (*)(CAircraftModelList &, bool)>(&CDatabaseUtils::consolidateModelsWithDbData), directory);
|
||||
}
|
||||
|
||||
void CDbOwnModelsComponent::ps_onOwnModelsLoadingFinished(const CStatusMessage &status, const CSimulatorInfo &simulator)
|
||||
void CDbOwnModelsComponent::ps_onOwnModelsLoadingFinished(const CStatusMessage &status, const CSimulatorInfo &simulator, IAircraftModelLoader::LoadFinishedInfo info)
|
||||
{
|
||||
Q_ASSERT_X(simulator.isSingleSimulator(), Q_FUNC_INFO, "Expect single simulator");
|
||||
if (status.isSuccess() && this->m_modelLoader)
|
||||
@@ -464,6 +464,11 @@ namespace BlackGui
|
||||
ui->tvp_OwnAircraftModels->clear();
|
||||
CLogMessage(this).error("Loading of models failed, simulator '%1', details: %2") << simulator.toQString() << status.getMessage();
|
||||
}
|
||||
|
||||
// cache loads may occur in background, do not adjust UI
|
||||
if (info == IAircraftModelLoader::CacheLoaded) { return; }
|
||||
|
||||
// parsed loads normally explicit
|
||||
ui->le_Simulator->setText(simulator.toQString());
|
||||
ui->comp_SimulatorSelector->setValue(simulator);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user