diff --git a/src/blackmisc/simulation/aircraftmodel.cpp b/src/blackmisc/simulation/aircraftmodel.cpp index 10267b609..afff3a803 100644 --- a/src/blackmisc/simulation/aircraftmodel.cpp +++ b/src/blackmisc/simulation/aircraftmodel.cpp @@ -638,15 +638,19 @@ namespace BlackMisc return; } + // local file names and file timestamp this->updateLocalFileNames(otherModel); - if (this->hasValidDbKey() && otherModel.hasValidDbKey()) { return; } // both are DB data, treat as being the same except for filename maybe + if (m_fileTimestamp < 0 || otherModel.m_fileTimestamp > m_fileTimestamp) { this->setFileTimestamp(otherModel.getFileTimestamp()); } + // both are DB data, treat as being the same except for filename maybe + if (this->hasValidDbKey() && otherModel.hasValidDbKey()) { return; } + + // update attributes where applicable if (m_callsign.isEmpty()) { this->setCallsign(otherModel.getCallsign()); } if (m_modelString.isEmpty()) { this->setModelString(otherModel.getModelString()); } if (m_name.isEmpty()) { this->setName(otherModel.getName()); } if (m_modelType == TypeUnknown) { m_modelType = otherModel.getModelType(); } if (m_modelMode == Undefined) { m_modelType = otherModel.getModelType(); } - if (m_fileTimestamp < 0) { this->setFileTimestamp(otherModel.getFileTimestamp()); } if (m_description.isEmpty() || m_description.startsWith(CAircraftModel::autoGenerated(), Qt::CaseInsensitive)) { this->setDescription(otherModel.getDescription()); } if (this->getSimulator().isUnspecified()) {