Salome HOME
Fix issue related to selection of compsolid in the RemoveSubShapes feature
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Validators.cpp
index 8d785e658827d2d621b0d78407242db548749450..1b8c4d13e871d61edfa328944ca53298e0c9d75c 100644 (file)
@@ -906,7 +906,10 @@ bool FeaturesPlugin_ValidatorRemoveSubShapesSelection::isValid(const AttributePt
     return false;
   }
 
-  std::list<GeomShapePtr> aSubShapes = GeomAlgoAPI_ShapeTools::getLowLevelSubShapes(aBaseShape);
+  ListOfShape aSubShapes = GeomAlgoAPI_ShapeTools::getLowLevelSubShapes(aBaseShape);
+  // add to the list all sub-shapes of the compound due to they can be selected as a shapes to keep
+  for (GeomAPI_ShapeIterator anIt(aBaseShape); anIt.more(); anIt.next())
+    aSubShapes.push_back(anIt.current());
   for(int anIndex = 0; anIndex < aSubShapesAttrList->size(); ++anIndex) {
     bool isSameFound = false;
     AttributeSelectionPtr anAttrSelectionInList = aSubShapesAttrList->value(anIndex);