]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for recursive deleting of objects
authorvsv <vsv@opencascade.com>
Mon, 29 Oct 2018 15:02:49 +0000 (18:02 +0300)
committermpv <mpv@opencascade.com>
Mon, 19 Nov 2018 08:45:52 +0000 (11:45 +0300)
src/PartSet/PartSet_TreeNodes.cpp

index 3e0c734218ee4a90f8169b661affddeeaa4a1d00..54859794c00d0cad685b4ab473f5ea0c4e1edbe0 100644 (file)
@@ -368,6 +368,7 @@ QTreeNodesList PartSet_ObjectNode::objectsDeleted(
         aObj = subObject(aId);
         if (aNode->object() != aObj) {
           myChildren.removeAll(aNode);
+          aResult.removeAll(aNode);
           delete aNode;
           isDeleted = true;
         }
@@ -601,6 +602,7 @@ QTreeNodesList PartSet_FolderNode::objectsDeleted(const DocumentPtr& theDoc,
       aToSort |= ((aIndex != -1) && (aId != aIndex));
       if (aIndex == -1) {
         myChildren.removeAll(aNode);
+        aResult.removeAll(aNode);
         delete aNode;
         aRemoved = true;
       }
@@ -697,6 +699,7 @@ QTreeNodesList PartSet_FeatureFolderNode::objectsDeleted(const DocumentPtr& theD
         aToSort |= ((aIndex != -1) && (aId != (aIndex + aNb)));
         if (aIndex == -1) {
           myChildren.removeAll(aNode);
+          aResult.removeAll(aNode);
           delete aNode;
           aRemoved = true;
           continue;
@@ -1134,6 +1137,7 @@ QTreeNodesList PartSet_ObjectFolderNode::objectsDeleted(const DocumentPtr& theDo
     if ((aFirst + aId) < aNbOfFeatures) {
       if (aNode->object() != aDoc->object(ModelAPI_Feature::group(), aFirst + aId)) {
         myChildren.removeAll(aNode);
+        aResult.removeAll(aNode);
         delete aNode;
         aRemoved = true;
         continue;
@@ -1141,6 +1145,7 @@ QTreeNodesList PartSet_ObjectFolderNode::objectsDeleted(const DocumentPtr& theDo
     }
     else {
       myChildren.removeAll(aNode);
+      aResult.removeAll(aNode);
       delete aNode;
       aRemoved = true;
       continue;