From 7d7b7b3bd18ea047f3d6f1b44869520861135734 Mon Sep 17 00:00:00 2001 From: James Turner Date: Sat, 20 Jun 2020 14:05:37 +0100 Subject: [PATCH] Launcher: if user has favorites defined, show them. Suggested by Henning, that if the user has defined favorite aircraft, default to that tab. Will pick to 2020.2 once verified. --- src/GUI/qml/AircraftList.qml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/GUI/qml/AircraftList.qml b/src/GUI/qml/AircraftList.qml index 516ab8fa1..62a729a66 100644 --- a/src/GUI/qml/AircraftList.qml +++ b/src/GUI/qml/AircraftList.qml @@ -17,8 +17,16 @@ FocusScope } } + state: "installed" + Component.onCompleted: { _launcher.browseAircraftModel.loadRatingsSettings(); + + // if the user has favourites defined, default to that tab + if (_launcher.favouriteAircraftModel.count > 0) { + root.state = "favourites" + root.updateSelectionFromLauncher(); + } } Rectangle @@ -188,8 +196,6 @@ FocusScope visible: (root.state == "updates") && (_launcher.aircraftWithUpdatesModel.count == 0) } - state: "installed" - states: [ State { name: "installed"