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.

Task-number: QDS-9226
Change-Id: I4040cda4a8c541edc12b4bfe821a09c76eb7efc4
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
Samuel Ghinet
2023-02-21 14:29:09 +02:00
parent 9d0099245a
commit bf61be5cc0

View File

@@ -165,7 +165,10 @@ Item {
}
}
onClicked: {
onClicked: (mouse) => {
if (mouse.button !== Qt.LeftButton)
return
if (root.downloadState !== "" && root.downloadState !== "failed")
return