Launcher: Validate restored aircraft state on load
Otherwise a stray state can enter the logic, unless the user re-selects it.
This commit is contained in:
parent
f0e2a297ae
commit
9855e89109
1 changed files with 7 additions and 0 deletions
|
@ -457,6 +457,13 @@ void LauncherController::updateSelectedAircraft()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!m_aircraftState.isEmpty()) {
|
||||||
|
if (!m_selectedAircraftInfo->hasState(m_aircraftState)) {
|
||||||
|
m_aircraftState.clear();
|
||||||
|
emit selectedAircraftStateChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
emit canFlyChanged();
|
emit canFlyChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue