summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Ghinet <samuel.ghinet@qt.io>2023-02-21 14:29:09 +0200
committerThomas Hartmann <thomas.hartmann@qt.io>2023-02-22 10:21:10 +0000
commit2333ed54cd6624482cee8ebf70e8913aea96c966 (patch)
tree0e890b3e341d84bc8ccbdb651447e4a99a017e0f
parent8f17625ef5df4b1782355a8304f65164a7074903 (diff)
downloadqt-creator-2333ed54cd6624482cee8ebf70e8913aea96c966.tar.gz
QmlDesigner: Allow texture download only via left mouse button
Previously, the user would have downloaded the real texture even when clicking with the right mouse button. (cherry picked from commit bf61be5cc0a08d28a1327c081d6f547587d3591b) Task-number: QDS-9226 Change-Id: I4040cda4a8c541edc12b4bfe821a09c76eb7efc4 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
-rw-r--r--share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexture.qml5
1 files changed, 4 insertions, 1 deletions
diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexture.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexture.qml
index ac98bb40fa..f1d7b8a78d 100644
--- a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexture.qml
+++ b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexture.qml
@@ -165,7 +165,10 @@ Item {
}
}
- onClicked: {
+ onClicked: (mouse) => {
+ if (mouse.button !== Qt.LeftButton)
+ return
+
if (root.downloadState !== "" && root.downloadState !== "failed")
return