Salome HOME
Fix incorrect result of selection of filter "F12: Topologically connected faces".
[modules/shaper.git] / src / FiltersPlugin / FiltersPlugin_TopoConnectedFaces.py
index 7176e34e043feb97df710925ec73c947a240edf3..6f27040e9da26f4c6f54373cd33c92b17a88f352 100644 (file)
@@ -64,6 +64,9 @@ class FiltersPlugin_TopoConnectedFaces(ModelAPI_Filter):
         if anOwner is None:
           return False
       topLevelShape = anOwner.shape()
+      if not topLevelShape.isSubShape(selectedShape):
+        return False;
+
       mapVFAlgo = mapShapesAndAncestors(topLevelShape, GeomAPI_Shape.VERTEX, GeomAPI_Shape.FACE)
       mapVF = mapVFAlgo.map()
       mapEFAlgo = mapShapesAndAncestors(topLevelShape, GeomAPI_Shape.EDGE, GeomAPI_Shape.FACE)