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>
This commit is contained in:
Henning Gruendl
2022-09-26 11:36:14 +02:00
committed by Henning Gründl
parent e32f585fda
commit 9bde8dc3e8
2 changed files with 7 additions and 1 deletions

View File

@@ -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

View File

@@ -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)