summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@digia.com>2013-11-25 13:45:39 +0100
committerThomas Hartmann <Thomas.Hartmann@digia.com>2013-11-25 13:46:08 +0100
commit36c3a12f383f78cb84664306c3cc0a4a0ac96f40 (patch)
treeec42bf19421bf65221e66a7f54e35171cfb91ac4 /share
parent70cc5751fc4d58d9e862dffa1bc56ea5434f2b6c (diff)
downloadqt-creator-36c3a12f383f78cb84664306c3cc0a4a0ac96f40.tar.gz
QmlDesigner.PropertyEditor: fix for gradient editing
We have to ensure that currentColor is not set to early. Change-Id: I243898e08adf2f68d037374cc6c8ff586b1d5d0d Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml9
1 files changed, 9 insertions, 0 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml
index b88248865f..889b2ce16c 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml
@@ -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 {