forked from qt-creator/qt-creator
QmlDesigner.PropertyEditor: Final fixes for gradient editing
We react to selection change now and keep the selection. Change-Id: I847b8cf308277df92295822f9cd18ebb58cc2ba0 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
@@ -39,8 +39,13 @@ Item {
|
|||||||
|
|
||||||
property bool hasGradient: gradientModel.hasGradient
|
property bool hasGradient: gradientModel.hasGradient
|
||||||
|
|
||||||
|
|
||||||
property alias gradientPropertyName: gradientModel.gradientPropertyName
|
property alias gradientPropertyName: gradientModel.gradientPropertyName
|
||||||
|
|
||||||
|
onHasGradientChanged: {
|
||||||
|
colorLine.invalidate()
|
||||||
|
}
|
||||||
|
|
||||||
onCurrentColorChanged: {
|
onCurrentColorChanged: {
|
||||||
gradientModel.setColor(colorLine.selectedIndex, currentColor)
|
gradientModel.setColor(colorLine.selectedIndex, currentColor)
|
||||||
colorLine.invalidate()
|
colorLine.invalidate()
|
||||||
@@ -55,6 +60,14 @@ Item {
|
|||||||
gradientModel.deleteGradient()
|
gradientModel.deleteGradient()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: modelNodeBackend
|
||||||
|
onSelectionChanged: {
|
||||||
|
colorLine.invalidate()
|
||||||
|
colorLine.select(0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: colorLine
|
id: colorLine
|
||||||
height: 80
|
height: 80
|
||||||
@@ -283,6 +296,7 @@ Item {
|
|||||||
}
|
}
|
||||||
parent.y = 20
|
parent.y = 20
|
||||||
colorLine.invalidate()
|
colorLine.invalidate()
|
||||||
|
colorLine.select(colorLine.selectedIndex)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user