diff options
author | Richard Moe Gustavsen <richard.gustavsen@digia.com> | 2014-08-16 01:08:48 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@digia.com> | 2014-09-08 15:25:10 +0200 |
commit | 90796c6b4426b7e627c676b19aee402e35e9677c (patch) | |
tree | 42d4a895d190ebd26439c2ef96575ea8caa565f5 | |
parent | 7e2d0b84ac2d3b3fc45e5276917a3dccb8750b3d (diff) |
Texthandle: prevent flickables from stealing drag
When starting a drag on the handles, you don't wan't
any flickable to cancel it. The handle should win
in this case. The current implementation seems to
do the same, but will sometimes fail.
Change-Id: If3c735acfe0aacab2fcc257c9a391511993b1990
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
-rw-r--r-- | src/controls/Private/TextHandle.qml | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/controls/Private/TextHandle.qml b/src/controls/Private/TextHandle.qml index 555262031..19fc19a6d 100644 --- a/src/controls/Private/TextHandle.qml +++ b/src/controls/Private/TextHandle.qml @@ -76,6 +76,7 @@ Loader { id: mouse anchors.fill: item enabled: handle.active + preventStealing: true property real pressX property point offset property bool handleDragged: false @@ -91,7 +92,6 @@ Loader { offset = Qt.point(mouseX - center.x, mouseY - center.y) } onReleased: { - preventStealing = false if (!handleDragged) { // The user just clicked on the handle. In that // case clear the selection. @@ -100,10 +100,6 @@ Loader { editor.select(editorPos, editorPos) } } - onMouseXChanged: { - if (Math.abs(mouse.x - pressX) >= Settings.dragThreshold) - preventStealing = true - } onPositionChanged: { handleDragged = true var pt = mapToItem(editor, mouse.x - offset.x, mouse.y - offset.y) |