forked from qt-creator/qt-creator
QmlDesigner.propertyEditor allow setting of expressions in states
This commit is contained in:
@@ -155,6 +155,8 @@ void PropertyEditor::NodeType::setValue(const QmlObjectNode & fxObjectNode, cons
|
|||||||
propertyValue->setValue(value);
|
propertyValue->setValue(value);
|
||||||
if (!fxObjectNode.hasBindingProperty(name))
|
if (!fxObjectNode.hasBindingProperty(name))
|
||||||
propertyValue->setExpression(value.toString());
|
propertyValue->setExpression(value.toString());
|
||||||
|
else
|
||||||
|
propertyValue->setExpression(fxObjectNode.expression(name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -469,10 +471,8 @@ void PropertyEditor::changeExpression(const QString &name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (fxObjectNode.currentState().isBaseState()) {
|
if (fxObjectNode.expression(name) != value->expression() || !fxObjectNode.propertyAffectedByCurrentState(name))
|
||||||
if (fxObjectNode.modelNode().bindingProperty(name).expression() != value->expression())
|
fxObjectNode.setBindingProperty(name, value->expression());
|
||||||
fxObjectNode.modelNode().bindingProperty(name).setExpression(value->expression());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
catch (RewritingException &e) {
|
catch (RewritingException &e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user