aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Gruendl <henning.gruendl@qt.io>2022-09-26 11:36:14 +0200
committerHenning Gründl <henning.gruendl@qt.io>2022-09-26 10:05:49 +0000
commit9bde8dc3e8dc853959895e653a41bf6ed3a67f95 (patch)
treeccbbbc9d0b00979ddf936dfb33b46b01e2a50d91
parente32f585fdaa5c374fc5cd12e527876287c7ee6aa (diff)
QmlDesigner: Fix dragging while scrolling
Task-number: QDS-7744 Change-Id: I99de01a09ef939e506c07d411c42bd2b28a53c31 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Brook Cronin <brook.cronin@qt.io>
-rw-r--r--share/qtcreator/qmldesigner/newstateseditor/Main.qml4
-rw-r--r--share/qtcreator/qmldesigner/newstateseditor/StateThumbnail.qml4
2 files changed, 7 insertions, 1 deletions
diff --git a/share/qtcreator/qmldesigner/newstateseditor/Main.qml b/share/qtcreator/qmldesigner/newstateseditor/Main.qml
index f38baa7bd4..9bc9e6eb4b 100644
--- a/share/qtcreator/qmldesigner/newstateseditor/Main.qml
+++ b/share/qtcreator/qmldesigner/newstateseditor/Main.qml
@@ -526,6 +526,7 @@ Rectangle {
anchors.leftMargin: root.leftMargin
ScrollBar.horizontal: StateScrollBar {
+ id: horizontalBar
parent: scrollView
x: scrollView.leftPadding
y: scrollView.height - height
@@ -534,6 +535,7 @@ Rectangle {
}
ScrollBar.vertical: StateScrollBar {
+ id: verticalBar
parent: scrollView
x: scrollView.mirrored ? 0 : scrollView.width - width
y: scrollView.topPadding
@@ -763,6 +765,8 @@ Rectangle {
hasWhenCondition: delegateRoot.hasWhenCondition
+ scrollViewActive: horizontalBar.active || verticalBar.active
+
dragParent: scrollView
// Fix ScrollView taking over the dragging event
diff --git a/share/qtcreator/qmldesigner/newstateseditor/StateThumbnail.qml b/share/qtcreator/qmldesigner/newstateseditor/StateThumbnail.qml
index ee1ea8132a..ce95aa2198 100644
--- a/share/qtcreator/qmldesigner/newstateseditor/StateThumbnail.qml
+++ b/share/qtcreator/qmldesigner/newstateseditor/StateThumbnail.qml
@@ -55,6 +55,8 @@ Item {
property bool hasWhenCondition: false
+ property bool scrollViewActive: false
+
property Item dragParent
property int visualIndex: 0
@@ -89,7 +91,7 @@ Item {
DragHandler {
id: dragHandler
- enabled: !root.baseState && !root.extendedState
+ enabled: !root.baseState && !root.extendedState && !root.scrollViewActive
onGrabChanged: function (transition, point) {
if (transition === PointerDevice.GrabPassive
|| transition === PointerDevice.GrabExclusive)