]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for deletion of groups
authorvsv <vsv@opencascade.com>
Thu, 1 Nov 2018 08:31:15 +0000 (11:31 +0300)
committervsv <vsv@opencascade.com>
Thu, 1 Nov 2018 08:31:34 +0000 (11:31 +0300)
src/PartSet/PartSet_TreeNodes.cpp

index 54859794c00d0cad685b4ab473f5ea0c4e1edbe0..a2bc7be624e6a76f2677355c102beabf2870c215 100644 (file)
@@ -865,9 +865,15 @@ void PartSet_PartRootNode::update()
   if (aHasFields && (!myChildren.contains(myFieldsFolder))) {
     myChildren.insert(3, myFieldsFolder);
   }
+  else if (myChildren.contains(myFieldsFolder)) {
+    myChildren.removeAll(myFieldsFolder);
+  }
   if (aHasGroups && (!myChildren.contains(myGroupsFolder))) {
     myChildren.insert(aHasFields ? 4 : 3, myGroupsFolder);
   }
+  else if (myChildren.contains(myGroupsFolder)) {
+    myChildren.removeAll(myGroupsFolder);
+  }
 
   // Update features content
   int aRows = numberOfFolders();