Fix jumping aircraft list when editing ratings
This commit is contained in:
parent
9dc1c1bbcf
commit
f9e113d811
2 changed files with 7 additions and 1 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue