1
0
Fork 0

Fix jumping aircraft list when editing ratings

This commit is contained in:
James Turner 2018-01-30 17:24:41 +00:00
parent 9dc1c1bbcf
commit f9e113d811
2 changed files with 7 additions and 1 deletions

View file

@ -80,7 +80,7 @@ Item
AircraftRatingsPanel { AircraftRatingsPanel {
width: aircraftList.width - Style.strutSize * 2 width: aircraftList.width - Style.strutSize * 2
x: (aircraftList.width - width) / 2 x: (aircraftList.width - width) / 2
theList: aircraftList
} }
} }

View file

@ -4,6 +4,8 @@ import "."
ListHeaderBox ListHeaderBox
{ {
property ListView theList: null
contents: [ contents: [
ToggleSwitch { ToggleSwitch {
@ -35,7 +37,11 @@ ListHeaderBox
text: qsTr("Adjust minimum ratings") text: qsTr("Adjust minimum ratings")
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
onClicked: { onClicked: {
// clear selection so we don't jump to the selected item
// each time the proxy model changes.
theList.currentIndex = -1;
editRatingsPanel.visible = true editRatingsPanel.visible = true
} }
}, },