on xenial help sign in
We want to select the first enabled, not necessarily 0
commitb0910f7f099c80e21dad7dfc14754a05a5fc77a8 authorAlbert Astals Cid <albert.astals@canonical.com> dateWed 1 Mar 2017, 15:27 (10 years ago) parent6fcf493
1 file changed+4−4
qml/ApplicationMenus/MenuPopup.qml+4−4
qml/ApplicationMenus/MenuPopup.qml+4−4
@@ -73,8 +73,8 @@ UbuntuShape {
7373 d.currentItem = null;
7474 }
7575
76− function select(index) {
77− d.select(index)
76+ function selectFirstIndex() {
77+ d.selectNext(-1);
7878 }
7979
8080 function reset() {
@@ -287,7 +287,7 @@ UbuntuShape {
287287
288288 onCountChanged: {
289289 if (!d.currentItem && count > 0) {
290− root.select(0);
290+ root.selectFirstIndex();
291291 }
292292 }
293293
@@ -489,7 +489,7 @@ UbuntuShape {
489489 onChildActivated: childActivated();
490490 }
491491
492− onVisibleChanged: if (visible) { item.select(0); }
492+ onVisibleChanged: if (visible) { item.selectFirstIndex(); }
493493 }
494494 }
495495 }