mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
refs #720, treat auto gen. descriptions as "empty"
This commit is contained in:
committed by
Mathew Sutcliffe
parent
da343d81c1
commit
4582387684
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user