aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@nokia.com>2011-08-02 11:44:29 +0200
committerThomas Hartmann <Thomas.Hartmann@nokia.com>2011-08-02 11:47:26 +0200
commitc1850305e67d0cbad08a8bd43168a264ce996f1e (patch)
treebfdf50f54ba85624a90354f3d90f5c1eb54c2866 /share
parent3e8ffed0997fb0863925e87a0d4221a55c1a5492 (diff)
QmlDesigner.propertyEditor: crash fix
We did not handle the case that a gradient is a binding. Change-Id: Ib6892420c6d5de7522cb2b051ff2b046ab781c14 Reviewed-on: http://codereview.qt.nokia.com/2503 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleColorGroupBox.qml6
1 files changed, 5 insertions, 1 deletions
diff --git a/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleColorGroupBox.qml b/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleColorGroupBox.qml
index 79dafeccdba..14edc0afb37 100644
--- a/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleColorGroupBox.qml
+++ b/share/qtcreator/qmldesigner/propertyeditor/Qt/RectangleColorGroupBox.qml
@@ -48,6 +48,8 @@ GroupBox {
property variant colorAlpha: colorGroupBox.alpha
property bool hasGradient: backendValues.gradient.isInModel
+ property bool gradientIsBinding: backendValues.gradient.isBound
+
onHasGradientChanged: {
print("onGradientInModelChanged")
if (backendValues.gradient.isInModel) {
@@ -75,7 +77,7 @@ GroupBox {
isSetup = true;
gradientLine.active = false;
colorGroupBox.setSolidButtonChecked = true;
- if (backendValues.gradient.isInModel) {
+ if (backendValues.gradient.isInModel && !gradientIsBinding) {
colorGroupBox.setGradientButtonChecked = true;
gradientLine.active = true;
gradientLine.setupGradient();
@@ -117,6 +119,8 @@ GroupBox {
}
ColorGroupBox {
+ enabled: !gradientIsBinding
+ opacity: gradientIsBinding ? 0.7 : 1
id: colorGroupBox
caption: qsTr("Rectangle")
finished: finishedNotify