From d5b71611e2f8553295f12663813c4116ab43ac92 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 6 Aug 2015 15:25:30 +0200 Subject: [PATCH] always show the edit menu when the cursor is visible not super nice but needed functionality-wise, since i cannot trigger the menu from CursorDelegate --- src/declarativeimports/plasmastyle/CursorDelegate.qml | 1 + src/declarativeimports/plasmastyle/EditMenuTouch.qml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/declarativeimports/plasmastyle/CursorDelegate.qml b/src/declarativeimports/plasmastyle/CursorDelegate.qml index 3b335a018..8995540bb 100644 --- a/src/declarativeimports/plasmastyle/CursorDelegate.qml +++ b/src/declarativeimports/plasmastyle/CursorDelegate.qml @@ -61,6 +61,7 @@ Item { var pos = mapToItem(input, mouse.x, mouse.y); input.cursorPosition = input.positionAt(pos.x, pos.y); } + onPressAndHold: print("AAAAAA"+control.getMenuInstance()) } } diff --git a/src/declarativeimports/plasmastyle/EditMenuTouch.qml b/src/declarativeimports/plasmastyle/EditMenuTouch.qml index 301f8000d..d3208e870 100644 --- a/src/declarativeimports/plasmastyle/EditMenuTouch.qml +++ b/src/declarativeimports/plasmastyle/EditMenuTouch.qml @@ -126,7 +126,7 @@ Item { id: popupTimer interval: 1 onTriggered: { - if (((input.canPaste && mouseArea.pressed) || selectionStart !== selectionEnd) && control.activeFocus) { + if ((input.canPaste || selectionStart !== selectionEnd) && control.activeFocus) { var startRect = input.positionToRectangle(input.selectionStart); var endRect = input.positionToRectangle(input.selectionEnd);