Commit 1c2cb4be authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.PropertyEditor: Final fixes for gradient editing

We react to selection change now and keep the selection.

Change-Id: I847b8cf308277df92295822f9cd18ebb58cc2ba0
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 95b0f52c
......@@ -39,8 +39,13 @@ Item {
property bool hasGradient: gradientModel.hasGradient
property alias gradientPropertyName: gradientModel.gradientPropertyName
onHasGradientChanged: {
colorLine.invalidate()
}
onCurrentColorChanged: {
gradientModel.setColor(colorLine.selectedIndex, currentColor)
colorLine.invalidate()
......@@ -55,6 +60,14 @@ Item {
gradientModel.deleteGradient()
}
Connections {
target: modelNodeBackend
onSelectionChanged: {
colorLine.invalidate()
colorLine.select(0)
}
}
Item {
id: colorLine
height: 80
......@@ -283,6 +296,7 @@ Item {
}
parent.y = 20
colorLine.invalidate()
colorLine.select(colorLine.selectedIndex)
}
}
}
......
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