Launcher state naming fix (parked vs parking)
Ensure both ‘parked’ and ‘parking’ are handled by the launcher display code and auto-state-selection logic.
This commit is contained in:
parent
ca8b84dae0
commit
421a5601c1
2 changed files with 11 additions and 5 deletions
|
@ -392,8 +392,13 @@ QString LauncherController::selectAircraftStateAutomatically()
|
|||
return "approach";
|
||||
}
|
||||
|
||||
if (m_location->isParkedLocation() && m_selectedAircraftInfo->hasState("parked")) {
|
||||
return "parked";
|
||||
if (m_location->isParkedLocation()) {
|
||||
if (m_selectedAircraftInfo->hasState("parked")) {
|
||||
return "parked";
|
||||
}
|
||||
if (m_selectedAircraftInfo->hasState("parking")) {
|
||||
return "parking";
|
||||
}
|
||||
} else {
|
||||
// also try 'engines-running'?
|
||||
if (m_selectedAircraftInfo->hasState("take-off"))
|
||||
|
|
|
@ -140,8 +140,9 @@ static AircraftStateVec readAircraftStates(const SGPath& setXMLPath)
|
|||
QString humanNameFromStateTag(const std::string& tag)
|
||||
{
|
||||
if (tag == "approach") return QObject::tr("On approach");
|
||||
if (tag == "take-off") return QObject::tr("Ready for Take-off");
|
||||
if ((tag == "parking") || (tag == "cold-and-dark"))
|
||||
if ((tag == "take-off") || (tag == "takeoff"))
|
||||
return QObject::tr("Ready for Take-off");
|
||||
if ((tag == "parked") || (tag == "parking") || (tag == "cold-and-dark"))
|
||||
return QObject::tr("Parked, cold & dark");
|
||||
if (tag == "auto")
|
||||
return QObject::tr("Automatic");
|
||||
|
@ -150,7 +151,7 @@ QString humanNameFromStateTag(const std::string& tag)
|
|||
if (tag == "taxi")
|
||||
return QObject::tr("Ready to taxi");
|
||||
|
||||
qWarning() << Q_FUNC_INFO << "add for" << QString::fromStdString(tag);
|
||||
qWarning() << Q_FUNC_INFO << "add translation / string for" << QString::fromStdString(tag);
|
||||
// no mapping, let's use the tag directly
|
||||
return QString::fromStdString(tag);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue