refs #720, treat auto gen. descriptions as "empty"

This commit is contained in:
Klaus Basan
2016-08-12 23:51:57 +02:00
committed by Mathew Sutcliffe
parent da343d81c1
commit 4582387684
3 changed files with 11 additions and 2 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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);