Fix not reliably being able to select "None" in Graphics settings

This commit is contained in:
David Rowe 2016-03-05 10:17:39 +13:00
parent 1eb6fa425c
commit b4c489d4c6

View file

@ -148,6 +148,7 @@ FocusScope {
function previousItem() { listView.currentIndex = (listView.currentIndex + listView.count - 1) % listView.count; }
function nextItem() { listView.currentIndex = (listView.currentIndex + listView.count + 1) % listView.count; }
function selectCurrentItem() { root.currentIndex = listView.currentIndex; hideList(); }
function selectSpecificItem(index) { root.currentIndex = index; hideList(); }
Keys.onUpPressed: previousItem();
Keys.onDownPressed: nextItem();
@ -182,7 +183,7 @@ FocusScope {
anchors.fill: parent;
hoverEnabled: true
onEntered: listView.currentIndex = index;
onClicked: popup.selectCurrentItem()
onClicked: popup.selectSpecificItem(index)
}
}
}