From 2333ed54cd6624482cee8ebf70e8913aea96c966 Mon Sep 17 00:00:00 2001 From: Samuel Ghinet Date: Tue, 21 Feb 2023 14:29:09 +0200 Subject: [PATCH] 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 Reviewed-by: Samuel Ghinet --- .../contentLibraryQmlSource/ContentLibraryTexture.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexture.qml b/share/qtcreator/qmldesigner/contentLibraryQmlSource/ContentLibraryTexture.qml index ac98bb40faa..f1d7b8a78d0 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