Commit 790e987f authored by Marco Bubke's avatar Marco Bubke
Browse files

Remove formeditoritems for removed nodeabstractproperties

parent c84e898f
......@@ -186,6 +186,26 @@ void FormEditorView::nodeAboutToBeRemoved(const ModelNode &removedNode)
void FormEditorView::propertiesAboutToBeRemoved(const QList<AbstractProperty>& propertyList)
{
foreach(const AbstractProperty &property, propertyList) {
if (property.isNodeAbstractProperty()) {
NodeAbstractProperty nodeAbstractProperty = property.toNodeAbstractProperty();
QList<FormEditorItem*> removedItemList;
foreach(const ModelNode &modelNode, nodeAbstractProperty.allSubNodes()) {
QmlItemNode qmlItemNode(modelNode);
if (qmlItemNode.isValid()) {
FormEditorItem *item = m_scene->itemForQmlItemNode(qmlItemNode);
removedItemList.append(item);
delete item;
}
}
m_currentTool->itemsAboutToRemoved(removedItemList);
}
}
QmlModelView::propertiesAboutToBeRemoved(propertyList);
}
void FormEditorView::nodeReparented(const ModelNode &node, const NodeAbstractProperty &newPropertyParent, const NodeAbstractProperty &oldPropertyParent, AbstractView::PropertyChangeFlags propertyChange)
......
Supports Markdown
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