Commit 6c96ed45 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.NodeInstances: fix creation crash

parent bae48751
......@@ -431,8 +431,6 @@ void ModelPrivate::notifyPropertiesRemoved(const QList<PropertyPair> &propertyPa
bool resetModel = false;
QString description;
try {
if (rewriterView()) {
QList<AbstractProperty> propertyList;
......@@ -579,18 +577,17 @@ void ModelPrivate::notifyNodeCreated(const InternalNode::Pointer &newInternalNod
resetModel = true;
}
if (nodeInstanceView()) {
ModelNode createdNode(newInternalNodePointer, model(), nodeInstanceView());
nodeInstanceView()->nodeCreated(createdNode);
}
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
Q_ASSERT(view != 0);
ModelNode createdNode(newInternalNodePointer, model(), view.data());
view->nodeCreated(createdNode);
}
if (nodeInstanceView()) {
ModelNode createdNode(newInternalNodePointer, model(), nodeInstanceView());
nodeInstanceView()->nodeCreated(createdNode);
}
if (resetModel) {
resetModelByRewriter(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