forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -103,7 +103,7 @@ Column {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onHasGradientChanged: {
|
onHasGradientChanged: {
|
||||||
if (!supportGradient)
|
if (!colorEditor.supportGradient)
|
||||||
return
|
return
|
||||||
|
|
||||||
if (gradientLine.hasGradient) {
|
if (gradientLine.hasGradient) {
|
||||||
@@ -217,7 +217,9 @@ Column {
|
|||||||
iconSource: "images/icon_color_solid.png"
|
iconSource: "images/icon_color_solid.png"
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
gradientLine.deleteGradient()
|
if (colorEditor.supportGradient)
|
||||||
|
gradientLine.deleteGradient()
|
||||||
|
|
||||||
textField.text = colorEditor.color
|
textField.text = colorEditor.color
|
||||||
colorEditor.backendValue.resetValue()
|
colorEditor.backendValue.resetValue()
|
||||||
}
|
}
|
||||||
@@ -472,7 +474,8 @@ Column {
|
|||||||
iconSource: "images/icon_color_none.png"
|
iconSource: "images/icon_color_none.png"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
colorEditor.color = "#00000000"
|
colorEditor.color = "#00000000"
|
||||||
gradientLine.deleteGradient()
|
if (colorEditor.supportGradient)
|
||||||
|
gradientLine.deleteGradient()
|
||||||
}
|
}
|
||||||
tooltip: qsTr("Transparent")
|
tooltip: qsTr("Transparent")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user