on xenial help sign in
simplify
commit5d86cc3c5ba97a2b481fddeac9e0b0ecaf153df5 authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 26 Jan 2017, 16:12 (10 years ago) parent40cd8c6
1 file changed+5−5
qml/Launcher/Drawer.qml+5−5
qml/Launcher/Drawer.qml+5−5
@@ -95,11 +95,11 @@ FocusScope {
9595 KeyNavigation.down: sections
9696
9797 onAccepted: {
98− // In case there is no currentItem (it might have been filtered away) lets reset it to the first item
99− if (listLoader.item && !listLoader.item.currentItem) {
100− listLoader.item.currentIndex = 0;
101− }
102− if (searchField.displayText != "" && listLoader.item && listLoader.item.currentItem) {
98+ if (searchField.displayText != "" && listLoader.item) {
99+ // In case there is no currentItem (it might have been filtered away) lets reset it to the first item
100+ if (!listLoader.item.currentItem) {
101+ listLoader.item.currentIndex = 0;
102+ }
103103 root.applicationSelected(listLoader.item.getFirstAppId());
104104 }
105105 }