diff --git a/src/GUI/qml/AircraftList.qml b/src/GUI/qml/AircraftList.qml index 3938a0916..07f063b55 100644 --- a/src/GUI/qml/AircraftList.qml +++ b/src/GUI/qml/AircraftList.qml @@ -80,7 +80,7 @@ Item AircraftRatingsPanel { width: aircraftList.width - Style.strutSize * 2 x: (aircraftList.width - width) / 2 - + theList: aircraftList } } diff --git a/src/GUI/qml/AircraftRatingsPanel.qml b/src/GUI/qml/AircraftRatingsPanel.qml index ca001232f..7001a837d 100644 --- a/src/GUI/qml/AircraftRatingsPanel.qml +++ b/src/GUI/qml/AircraftRatingsPanel.qml @@ -4,6 +4,8 @@ import "." ListHeaderBox { + property ListView theList: null + contents: [ ToggleSwitch { @@ -35,7 +37,11 @@ ListHeaderBox text: qsTr("Adjust minimum ratings") anchors.verticalCenter: parent.verticalCenter onClicked: { + // clear selection so we don't jump to the selected item + // each time the proxy model changes. + theList.currentIndex = -1; editRatingsPanel.visible = true + } },