]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
19997: Compute does not work in script, ok in GUI
authoreap <eap@opencascade.com>
Mon, 13 Oct 2008 08:12:34 +0000 (08:12 +0000)
committereap <eap@opencascade.com>
Mon, 13 Oct 2008 08:12:34 +0000 (08:12 +0000)
     in clearSubMesh() call ComputeStateEngine() only on not empty submesh

src/SMESH/SMESH_Pattern.cxx

index b8dd698a16b37967d1aed8058db657328be6416c..292af478f4181ff6480e151f861608b6e53304a1 100644 (file)
@@ -3804,11 +3804,9 @@ static bool clearSubMesh( SMESH_Mesh*         theMesh,
   bool removed = false;
   if ( SMESH_subMesh * aSubMesh = theMesh->GetSubMeshContaining( theShape ))
   {
-    if ( aSubMesh->GetSubMeshDS() ) {
-      removed =
-        aSubMesh->GetSubMeshDS()->NbElements() || aSubMesh->GetSubMeshDS()->NbNodes();
+    removed = !aSubMesh->IsEmpty();
+    if ( removed )
       aSubMesh->ComputeStateEngine( SMESH_subMesh::CLEAN );
-    }
   }
   else {
     SMESHDS_Mesh* aMeshDS = theMesh->GetMeshDS();