Commit 36c3a12f authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.PropertyEditor: fix for gradient editing

We have to ensure that currentColor is not set to early.

Change-Id: I243898e08adf2f68d037374cc6c8ff586b1d5d0d
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 70cc5751
......@@ -64,6 +64,8 @@ Column {
id: colorEditor
onColorChanged: {
if (!gradientLine.isCompleted)
return;
textField.text = gradientLine.colorToString(color);
if (supportGradient && gradientLine.visible)
......@@ -75,6 +77,7 @@ Column {
}
GradientLine {
property bool isCompleted: false
visible: buttonRow.checkedIndex === 1
id: gradientLine
......@@ -86,6 +89,7 @@ Column {
}
onHasGradientChanged: {
print("hasGradient")
if (!supportGradient)
return
......@@ -95,6 +99,11 @@ Column {
buttonRow.initalChecked = 0
buttonRow.checkedIndex = buttonRow.initalChecked
}
Component.onCompleted: {
colorEditor.color = gradientLine.currentColor
isCompleted= true
}
}
SectionLayout {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment