From c225d3fe5d0d9354fb368b793e798403ab17a71f Mon Sep 17 00:00:00 2001 From: wang_zhiqiang Date: Sat, 13 Oct 2018 16:54:28 +0800 Subject: fix issue,call tap_shortcut carelessly --- launcher/qml/Launcher.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/launcher/qml/Launcher.qml b/launcher/qml/Launcher.qml index 31b1f3d..6d55271 100644 --- a/launcher/qml/Launcher.qml +++ b/launcher/qml/Launcher.qml @@ -69,9 +69,13 @@ ApplicationWindow { y: 264 onPressAndHold: currentId = applicationModel.id(newIndex = index) onReleased: { + if(loc.index < 0) { + return + } if (currentId === '') { pid = launcher.launch(applicationModel.id(loc.index)) if (1 < pid) { + homescreenHandler.tapShortcut(applicationModel.name(loc.index)) } else { console.warn("app cannot be launched!") @@ -79,7 +83,6 @@ ApplicationWindow { } else { currentId = '' } - homescreenHandler.tapShortcut(applicationModel.name(loc.index)) } onPositionChanged: { if (loc.currentId === '') return -- cgit 1.2.3-korg