From: wang_zhiqiang Date: Sat, 13 Oct 2018 08:56:30 +0000 (+0800) Subject: fix issue,call tap_shortcut carelessly X-Git-Tag: 6.99.1~1 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=apps%2Flauncher.git;a=commitdiff_plain;h=471a8288f833334e38f3d999c8921c8585280dc9 fix issue,call tap_shortcut carelessly the scenes as below not call tap_shortcut 1)when touch blank 2)long press or move icon Change-Id: I13f2d1833af323da19ce2521cd2be6188fe1bb7a Signed-off-by: wang_zhiqiang --- 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