]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Provide nesting for tree nodes
authorvsv <vsv@opencascade.com>
Tue, 31 Jul 2018 15:32:14 +0000 (18:32 +0300)
committervsv <vsv@opencascade.com>
Tue, 31 Jul 2018 15:32:14 +0000 (18:32 +0300)
src/PartSet/PartSet_TreeNodes.cpp

index 415f1a44f2530273579df3debcd306eebb4697e5..0eff4cb000814101874886c6ffa0f467094a3850 100644 (file)
@@ -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;
 }