]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/FeaturesPlugin/FeaturesPlugin_RemoveSubShapes.cpp
Salome HOME
Fix issue related to selection of compsolid in the RemoveSubShapes feature
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_RemoveSubShapes.cpp
index e4d61f163b0066fa38a4ecd7ef87fe8dd4cc6b78..75b335b61eede0794c06f50e54bf1a3ce0949fcd 100644 (file)
@@ -133,7 +133,8 @@ void FeaturesPlugin_RemoveSubShapes::attributeChanged(const std::string& theID)
       for(anIndex = 0; anIndex < aSubsToKeepNb; ++anIndex) {
         AttributeSelectionPtr anAttrSelectionInList = aSubShapesToKeepAttrList->value(anIndex);
         GeomShapePtr aSubShapeToKeep = anAttrSelectionInList->value();
-        if (aSubShapeToKeep.get() && aSubShapeToKeep->isEqual(aSubShape)) {
+        if (aSubShapeToKeep.get() &&
+           (aSubShapeToKeep->isEqual(aSubShape) || aSubShapeToKeep->isSubShape(aSubShape))) {
           break;
         }
       }
@@ -173,7 +174,8 @@ void FeaturesPlugin_RemoveSubShapes::attributeChanged(const std::string& theID)
       for(anIndex = 0; anIndex < aSubsToRemoveNb; ++anIndex) {
         AttributeSelectionPtr anAttrSelectionInList = aSubShapesToRemoveAttrList->value(anIndex);
         GeomShapePtr aSubShapeToRemove = anAttrSelectionInList->value();
-        if (aSubShapeToRemove.get() && aSubShapeToRemove->isEqual(aSubShape)) {
+        if (aSubShapeToRemove.get() &&
+           (aSubShapeToRemove->isEqual(aSubShape) || aSubShapeToRemove->isSubShape(aSubShape))) {
           break;
         }
       }