mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Ref T67, allow to pass "forced"
This commit is contained in:
@@ -384,9 +384,9 @@ namespace BlackGui
|
||||
return models;
|
||||
}
|
||||
|
||||
CAircraftModel CDbStashComponent::consolidateWithDbData(const CAircraftModel &model) const
|
||||
CAircraftModel CDbStashComponent::consolidateWithDbData(const CAircraftModel &model, bool forced) const
|
||||
{
|
||||
const CAircraftModel consolidatedModel = CDatabaseUtils::consolidateModelWithDbData(model, true);
|
||||
const CAircraftModel consolidatedModel = CDatabaseUtils::consolidateModelWithDbData(model, forced);
|
||||
return consolidatedModel;
|
||||
}
|
||||
|
||||
@@ -410,11 +410,9 @@ namespace BlackGui
|
||||
CAircraftModel stashModel(model);
|
||||
const bool ownModel = stashModel.getModelType() == CAircraftModel::TypeOwnSimulatorModel;
|
||||
|
||||
// merge with DB data if any
|
||||
if (!stashModel.hasValidDbKey())
|
||||
{
|
||||
stashModel = this->consolidateWithDbData(stashModel);
|
||||
}
|
||||
// merge/update with DB data if any
|
||||
// this is a forced update with DB data, as DB data can change
|
||||
stashModel = this->consolidateWithDbData(stashModel, true);
|
||||
|
||||
// merge with own models if any
|
||||
if (!ownModel)
|
||||
|
||||
@@ -197,7 +197,7 @@ namespace BlackGui
|
||||
BlackMisc::Simulation::CAircraftModelList getSelectedOrAllModels() const;
|
||||
|
||||
//! Consolidate with any DB data (if available).
|
||||
BlackMisc::Simulation::CAircraftModel consolidateWithDbData(const BlackMisc::Simulation::CAircraftModel &model) const;
|
||||
BlackMisc::Simulation::CAircraftModel consolidateWithDbData(const BlackMisc::Simulation::CAircraftModel &model, bool forced) const;
|
||||
|
||||
//! Consolidate with own models (if available). This updates mostly with model description, path etc.
|
||||
BlackMisc::Simulation::CAircraftModel consolidateWithOwnModels(const BlackMisc::Simulation::CAircraftModel &model) const;
|
||||
|
||||
Reference in New Issue
Block a user