Salome HOME
0021096: EDF 1729 SMESH: Create a Projection 1D-2D algorithm
authoreap <eap@opencascade.com>
Mon, 17 Oct 2011 09:59:32 +0000 (09:59 +0000)
committereap <eap@opencascade.com>
Mon, 17 Oct 2011 09:59:32 +0000 (09:59 +0000)
In CleanDependants(), do not call ComputeStateEngine(CLEAN) of a
dependant subMesh if it IsEmpty() in order to prevent infinite CLEAN
via event lesteners

src/SMESH/SMESH_subMesh.cxx

index 7f766cc438377ad0b236ecb72b22e06ed663fd0c..fb86778c7b8105c7f081ebe913a845bc2bd48939 100644 (file)
@@ -1818,7 +1818,8 @@ void SMESH_subMesh::CleanDependants()
       // will erase mesh on other shapes in a compound
       if ( ancestor.ShapeType() >= TopAbs_SOLID ) {
         SMESH_subMesh *aSubMesh = _father->GetSubMeshContaining(ancestor);
-        if (aSubMesh)
+        if (aSubMesh &&
+            !aSubMesh->IsEmpty() ) // prevent infinite CLEAN via event lesteners
           aSubMesh->ComputeStateEngine(CLEAN);
       }
     }