mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
Improved model file timestamp handling
This commit is contained in:
committed by
Mat Sutcliffe
parent
b213f594c7
commit
ed2762fd40
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user