From 2fb27a2b1f7f3b4b181155f5c4ef9749320e9847 Mon Sep 17 00:00:00 2001 From: vsv Date: Tue, 31 Jul 2018 18:32:14 +0300 Subject: [PATCH] Provide nesting for tree nodes --- src/PartSet/PartSet_TreeNodes.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/PartSet/PartSet_TreeNodes.cpp b/src/PartSet/PartSet_TreeNodes.cpp index 415f1a44f..0eff4cb00 100644 --- a/src/PartSet/PartSet_TreeNodes.cpp +++ b/src/PartSet/PartSet_TreeNodes.cpp @@ -207,6 +207,9 @@ void PartSet_ObjectNode::update() aNode = myChildren.takeLast(); delete aNode; } + foreach(ModuleBase_ITreeNode* aNode, myChildren) { + aNode->update(); + } } } @@ -234,6 +237,9 @@ QTreeNodesList PartSet_ObjectNode::objectCreated(const QObjectPtrList& theObject aResult.append(aNode); } } + foreach(ModuleBase_ITreeNode* aNode, myChildren) { + aResult.append(aNode->objectCreated(theObjects)); + } } return aResult; } @@ -254,6 +260,12 @@ QTreeNodesList PartSet_ObjectNode::objectsDeleted(const DocumentPtr& theDoc, con } if (isDeleted) aResult.append(this); + int i = 0; + foreach(ModuleBase_ITreeNode* aNode, myChildren) { + ((PartSet_ObjectNode*)aNode)->setObject(aCompRes->subResult(i, true)); + aResult.append(aNode->objectsDeleted(theDoc, theGroup)); + i++; + } } return aResult; } -- 2.39.2