diff --git a/src/blackmisc/simulation/aircraftmodel.cpp b/src/blackmisc/simulation/aircraftmodel.cpp index 2c8716671..d97f22265 100644 --- a/src/blackmisc/simulation/aircraftmodel.cpp +++ b/src/blackmisc/simulation/aircraftmodel.cpp @@ -438,7 +438,7 @@ namespace BlackMisc this->updateByLocalFileNames(otherModel); if (this->m_callsign.isEmpty()) { this->setCallsign(otherModel.getCallsign()); } if (this->m_modelString.isEmpty()) { this->setModelString(otherModel.getModelString()); } - if (this->m_description.isEmpty()) { this->setDescription(otherModel.getDescription()); } + if (this->m_description.isEmpty() || this->m_description.startsWith(CAircraftModel::autoGenerated(), Qt::CaseInsensitive)) { this->setDescription(otherModel.getDescription()); } if (this->m_modelType == TypeUnknown) { this->m_modelType = otherModel.getModelType(); } if (this->m_modelMode == Undefined) { this->m_modelType = otherModel.getModelType(); } if (this->m_simulator.isUnspecified()) @@ -631,5 +631,11 @@ namespace BlackMisc } return liveryModelStrings; } + + const QString &CAircraftModel::autoGenerated() + { + static const QString ag("swift auto generated"); + return ag; + } } // namespace } // namespace diff --git a/src/blackmisc/simulation/aircraftmodel.h b/src/blackmisc/simulation/aircraftmodel.h index d05e34bf9..98220b0be 100644 --- a/src/blackmisc/simulation/aircraftmodel.h +++ b/src/blackmisc/simulation/aircraftmodel.h @@ -351,6 +351,9 @@ namespace BlackMisc //! \sa getSwiftLiveryString static QStringList splitNetworkLiveryString(const QString &liveryString); + //! Hint, that model was automatically generated (e.g. by auto stashing) + static const QString &autoGenerated(); + private: BlackMisc::Aviation::CCallsign m_callsign; //!< aircraft's callsign if any BlackMisc::Aviation::CAircraftIcaoCode m_aircraftIcao; //!< ICAO code if available diff --git a/src/blackmisc/simulation/fscommon/vpilotmodelrule.cpp b/src/blackmisc/simulation/fscommon/vpilotmodelrule.cpp index 64184c067..a115c7bbd 100644 --- a/src/blackmisc/simulation/fscommon/vpilotmodelrule.cpp +++ b/src/blackmisc/simulation/fscommon/vpilotmodelrule.cpp @@ -109,7 +109,7 @@ namespace BlackMisc const CDistributor distributor(getDistributor(), "vPilot based", "", ""); CAircraftModel model( this->m_modelName, CAircraftModel::TypeVPilotRuleBased, - "swift auto generated", + CAircraftModel::autoGenerated(), aircraftIcao, livery ); const CSimulatorInfo sim(CSimulatorInfo::FSX_P3D);