From: eap Date: Mon, 13 Oct 2008 08:12:34 +0000 (+0000) Subject: 19997: Compute does not work in script, ok in GUI X-Git-Tag: V5_1_0a3~19 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b45fb08505ed2875a8cdb95eb011ee3e97880da6;p=modules%2Fsmesh.git 19997: Compute does not work in script, ok in GUI in clearSubMesh() call ComputeStateEngine() only on not empty submesh --- diff --git a/src/SMESH/SMESH_Pattern.cxx b/src/SMESH/SMESH_Pattern.cxx index b8dd698a1..292af478f 100644 --- a/src/SMESH/SMESH_Pattern.cxx +++ b/src/SMESH/SMESH_Pattern.cxx @@ -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();