From: eap Date: Mon, 27 Mar 2006 09:34:26 +0000 (+0000) Subject: PAL11986. Set REDAY_TO_COMPUTE to the main submesh when mesh becomes empty X-Git-Tag: T3_2_0b1_pre1~80 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=38e52aa7f05b6b145abe719bf786ea57f244abf4;p=modules%2Fsmesh.git PAL11986. Set REDAY_TO_COMPUTE to the main submesh when mesh becomes empty --- diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index 992916482..dbc144929 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -122,11 +122,8 @@ bool SMESH_MeshEditor::Remove (const list< int >& theIDs, const SMDS_MeshNode* node = static_cast( nodeIt->next() ); const SMDS_PositionPtr& aPosition = node->GetPosition(); if ( aPosition.get() ) { - int aShapeID = aPosition->GetShapeId(); - if ( aShapeID ) { - TopoDS_Shape aShape = aMesh->IndexToShape( aShapeID ); - SMESH_subMesh * sm = GetMesh()->GetSubMeshContaining( aShape ); - if ( sm ) + if ( int aShapeID = aPosition->GetShapeId() ) { + if ( SMESH_subMesh * sm = GetMesh()->GetSubMeshContaining( aShapeID ) ) smmap.insert( sm ); } } @@ -146,6 +143,10 @@ bool SMESH_MeshEditor::Remove (const list< int >& theIDs, (*smIt)->ComputeStateEngine( SMESH_subMesh::MESH_ENTITY_REMOVED ); } + // Check if the whole mesh becomes empty + if ( SMESH_subMesh * sm = GetMesh()->GetSubMeshContaining( 1 ) ) + sm->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE ); + return true; }