Commit 72b9ad39 authored by Lasse Holmstedt's avatar Lasse Holmstedt
Browse files

Fix for crash on setting expressions to anchors in bauhaus

parent bea01410
......@@ -381,8 +381,17 @@ void PropertyEditor::changeExpression(const QString &name)
if (m_locked)
return;
QString underscoreName(name);
underscoreName.replace(QLatin1Char('.'), QLatin1Char('_'));
QmlObjectNode fxObjectNode(m_selectedNode);
PropertyEditorValue *value = qobject_cast<PropertyEditorValue*>(QDeclarativeMetaType::toQObject(m_currentType->m_backendValuesPropertyMap.value(name)));
PropertyEditorValue *value = qobject_cast<PropertyEditorValue*>(QDeclarativeMetaType::toQObject(m_currentType->m_backendValuesPropertyMap.value(underscoreName)));
if (!value) {
qWarning() << "PropertyEditor::changeExpression no value for " << underscoreName;
return;
}
try {
if (fxObjectNode.currentState().isBaseState()) {
fxObjectNode.modelNode().bindingProperty(name).setExpression(value->expression());
......
......@@ -37,4 +37,5 @@ SOURCES += qmlproject.cpp \
qmlprojecttarget.cpp
RESOURCES += qmlproject.qrc
OTHER_FILES += QmlProjectManager.pluginspec
OTHER_FILES += QmlProjectManager.pluginspec \
QmlProject.mimetypes.xml
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