From: vsv Date: Tue, 31 Jul 2018 15:32:14 +0000 (+0300) Subject: Provide nesting for tree nodes X-Git-Tag: SHAPER_V9_1_0RC1~73^2~34 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2fb27a2b1f7f3b4b181155f5c4ef9749320e9847;p=modules%2Fshaper.git Provide nesting for tree nodes --- 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; }