From b4c489d4c6ec393ce320d85e43625b4bedd0667a Mon Sep 17 00:00:00 2001 From: David Rowe Date: Sat, 5 Mar 2016 10:17:39 +1300 Subject: [PATCH] Fix not reliably being able to select "None" in Graphics settings --- interface/resources/qml/controls-uit/ComboBox.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interface/resources/qml/controls-uit/ComboBox.qml b/interface/resources/qml/controls-uit/ComboBox.qml index bad1524719..392d5534c8 100644 --- a/interface/resources/qml/controls-uit/ComboBox.qml +++ b/interface/resources/qml/controls-uit/ComboBox.qml @@ -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) } } }