19997: Compute does not work in script, ok in GUI

in clearSubMesh() call ComputeStateEngine() only on not empty submesh
This commit is contained in:
eap 2008-10-13 08:12:34 +00:00
parent 40fa3efd39
commit b45fb08505

View 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();