Commit 5181f2eb authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.propertyEditor: catch exceptions for expression editing

parent 86dadaef
......@@ -348,8 +348,14 @@ void PropertyEditor::changeExpression(const QString &name)
QmlObjectNode fxObjectNode(m_selectedNode);
PropertyEditorValue *value = qobject_cast<PropertyEditorValue*>(QmlMetaType::toQObject(m_currentType->m_backendValuesPropertyMap.value(name)));
if (fxObjectNode.currentState().isBaseState()) {
fxObjectNode.modelNode().bindingProperty(name).setExpression(value->expression());
try {
if (fxObjectNode.currentState().isBaseState()) {
fxObjectNode.modelNode().bindingProperty(name).setExpression(value->expression());
}
}
catch (Exception &e) {
QMessageBox::warning(0, "Error", e.description());
}
}
......
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