Commit d51b579d authored by Marco Bubke's avatar Marco Bubke Committed by Thomas Hartmann
Browse files

QmlDesigner.Model: Change order of notification to prevent crash

If the NodeInstance is allready removed the formeditor item isn't
removed.
parent d2b3258e
......@@ -605,17 +605,16 @@ void ModelPrivate::notifyNodeAboutToBeRemoved(const InternalNode::Pointer &nodeP
resetModel = true;
}
if (nodeInstanceView()) {
ModelNode node(nodePointer, model(), nodeInstanceView());
nodeInstanceView()->nodeAboutToBeRemoved(node);
}
foreach (const QWeakPointer<AbstractView> &view, m_viewList) {
Q_ASSERT(view != 0);
ModelNode node(nodePointer, model(), view.data());
view->nodeAboutToBeRemoved(node);
}
if (nodeInstanceView()) {
ModelNode node(nodePointer, model(), nodeInstanceView());
nodeInstanceView()->nodeAboutToBeRemoved(node);
}
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