summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2019-05-21 11:49:39 +0200
committerThomas Hartmann <thomas.hartmann@qt.io>2019-05-21 11:49:49 +0000
commitbd2aa8ada387184b6ab1f995a54582ae60093c7d (patch)
tree463c065c446ebbeb4fec5eef5afe438a43525476
parentcb71f6ec5fc9225055184dc96f5e7dfc23314230 (diff)
downloadqt-creator-bd2aa8ada387184b6ab1f995a54582ae60093c7d.tar.gz
QmlDesigner: Fix issue with gradient editing
The gradient only has to be deleted if we are in gradient editing mode. If we are not in gradient editing mode, we should not delete any gradient. This was creating issues when editing border.color. Task-number: QDS-675 Change-Id: Ie3fcbc4a817cb0062e895298d42794b7338084d6 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml9
1 files changed, 6 insertions, 3 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml
index c039d984fb..e39bd8e88d 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/ColorEditor.qml
@@ -103,7 +103,7 @@ Column {
}
onHasGradientChanged: {
- if (!supportGradient)
+ if (!colorEditor.supportGradient)
return
if (gradientLine.hasGradient) {
@@ -217,7 +217,9 @@ Column {
iconSource: "images/icon_color_solid.png"
onClicked: {
- gradientLine.deleteGradient()
+ if (colorEditor.supportGradient)
+ gradientLine.deleteGradient()
+
textField.text = colorEditor.color
colorEditor.backendValue.resetValue()
}
@@ -472,7 +474,8 @@ Column {
iconSource: "images/icon_color_none.png"
onClicked: {
colorEditor.color = "#00000000"
- gradientLine.deleteGradient()
+ if (colorEditor.supportGradient)
+ gradientLine.deleteGradient()
}
tooltip: qsTr("Transparent")
}