summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMahmoud Badri <mahmoud.badri@qt.io>2022-02-23 16:40:28 +0200
committerMahmoud Badri <mahmoud.badri@qt.io>2022-02-23 18:12:22 +0000
commit45364d43279ddc409e9def2e65b07a5129a2e9e2 (patch)
tree3b7197ace85abf5ce07866518ca378fb0c4aaada
parentc1512dce879ce0fd2c5d45858c3af8f3493f658e (diff)
downloadqt-creator-45364d43279ddc409e9def2e65b07a5129a2e9e2.tar.gz
QmlDesigner: Disable scrolling when context menu is open
Disable components and assets views scrolling when the context menu is open. Fixes: QDS-6317 Change-Id: Ibdbf29b14d0383fd2b876c655ccb17c35fdb6aff Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
-rw-r--r--share/qtcreator/qmldesigner/itemLibraryQmlSources/Assets.qml2
-rw-r--r--share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml2
2 files changed, 3 insertions, 1 deletions
diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/Assets.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/Assets.qml
index f254a32550..9ec7d8fcf3 100644
--- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/Assets.qml
+++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/Assets.qml
@@ -424,7 +424,7 @@ Item {
width: parent.width
height: parent.height - y
clip: true
- interactive: assetsView.verticalScrollBarVisible
+ interactive: assetsView.verticalScrollBarVisible && !contextMenu.opened
Column {
Repeater {
diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml
index e43342d650..bc0dc79ef2 100644
--- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml
+++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml
@@ -246,6 +246,7 @@ Item {
id: verticalScrollView
anchors.fill: parent
clip: true
+ interactive: !itemContextMenu.opened && !moduleContextMenu.opened
onContentHeightChanged: {
var maxPosition = Math.max(contentHeight - verticalScrollView.height, 0)
@@ -362,6 +363,7 @@ Item {
width: 270
height: parent.height
clip: true
+ interactive: !itemContextMenu.opened && !moduleContextMenu.opened
onContentHeightChanged: {
var maxPosition = Math.max(contentHeight - horizontalScrollView.height, 0)