From b45fb08505ed2875a8cdb95eb011ee3e97880da6 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 13 Oct 2008 08:12:34 +0000 Subject: [PATCH] 19997: Compute does not work in script, ok in GUI in clearSubMesh() call ComputeStateEngine() only on not empty submesh --- src/SMESH/SMESH_Pattern.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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(); -- 2.39.2