Commit 47bd94cf authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: Simplify NavigatorView::propertiesAboutToBeRemoved

Change-Id: I4abee1ef782bd2655ea72bf51947702232471212
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
parent 8735f98b
......@@ -202,13 +202,10 @@ void NavigatorView::nodeIdChanged(const ModelNode& node, const QString & /*newId
void NavigatorView::propertiesAboutToBeRemoved(const QList<AbstractProperty>& propertyList)
{
foreach (const AbstractProperty &property, propertyList) {
if (property.isNodeProperty()) {
NodeProperty nodeProperty(property.toNodeProperty());
m_treeModel->removeSubTree(nodeProperty.modelNode());
} else if (property.isNodeListProperty()) {
NodeListProperty nodeListProperty(property.toNodeListProperty());
foreach (const ModelNode &node, nodeListProperty.toModelNodeList()) {
m_treeModel->removeSubTree(node);
if (property.isNodeAbstractProperty()) {
NodeAbstractProperty nodeAbstractProperty(property.toNodeListProperty());
foreach (const ModelNode &childNode, nodeAbstractProperty.directSubNodes()) {
m_treeModel->removeSubTree(childNode);
}
}
}
......
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