mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Ref T58, consolidation fixes
* override simulator, because values can be removed * DB simulator has priority
This commit is contained in:
@@ -75,6 +75,7 @@ namespace BlackCore
|
||||
CAircraftModel dbModelModified(dbModel);
|
||||
dbModelModified.updateMissingParts(model);
|
||||
dbModelModified.setDistributorOrder(distributorOrder);
|
||||
dbModelModified.setSimulator(dbModel.getSimulator()); // DB simulator settings have priority
|
||||
return dbModelModified;
|
||||
}
|
||||
|
||||
|
||||
@@ -538,14 +538,11 @@ namespace BlackMisc
|
||||
if (this->m_modelMode == Undefined) { this->m_modelType = otherModel.getModelType(); }
|
||||
if (this->m_fileTimestamp < 0) { this->setFileTimestamp(otherModel.getFileTimestamp()); }
|
||||
if (this->m_description.isEmpty() || this->m_description.startsWith(CAircraftModel::autoGenerated(), Qt::CaseInsensitive)) { this->setDescription(otherModel.getDescription()); }
|
||||
if (this->m_simulator.isUnspecified())
|
||||
if (this->getSimulator().isUnspecified())
|
||||
{
|
||||
// simulator can only be overridden as simulators can also be removed
|
||||
this->setSimulator(otherModel.getSimulator());
|
||||
}
|
||||
else
|
||||
{
|
||||
this->m_simulator.add(otherModel.getSimulator());
|
||||
}
|
||||
|
||||
this->m_livery.updateMissingParts(otherModel.getLivery());
|
||||
this->m_aircraftIcao.updateMissingParts(otherModel.getAircraftIcaoCode());
|
||||
@@ -665,7 +662,7 @@ namespace BlackMisc
|
||||
|
||||
QString CAircraftModel::normalizeFileNameForDb(const QString &filePath)
|
||||
{
|
||||
QString n = CFileUtils::normalizeFilePathToQtStandard(filePath).toUpper();
|
||||
const QString n = CFileUtils::normalizeFilePathToQtStandard(filePath).toUpper();
|
||||
if (n.count('/') < 2) { return n; }
|
||||
return n.section('/', -2, -1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user