mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-29 10:50:34 +05:00
PAL11986. Set REDAY_TO_COMPUTE to the main submesh when mesh becomes empty
This commit is contained in:
parent
be1142b243
commit
38e52aa7f0
@ -122,11 +122,8 @@ bool SMESH_MeshEditor::Remove (const list< int >& theIDs,
|
|||||||
const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
|
const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
|
||||||
const SMDS_PositionPtr& aPosition = node->GetPosition();
|
const SMDS_PositionPtr& aPosition = node->GetPosition();
|
||||||
if ( aPosition.get() ) {
|
if ( aPosition.get() ) {
|
||||||
int aShapeID = aPosition->GetShapeId();
|
if ( int aShapeID = aPosition->GetShapeId() ) {
|
||||||
if ( aShapeID ) {
|
if ( SMESH_subMesh * sm = GetMesh()->GetSubMeshContaining( aShapeID ) )
|
||||||
TopoDS_Shape aShape = aMesh->IndexToShape( aShapeID );
|
|
||||||
SMESH_subMesh * sm = GetMesh()->GetSubMeshContaining( aShape );
|
|
||||||
if ( sm )
|
|
||||||
smmap.insert( sm );
|
smmap.insert( sm );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -146,6 +143,10 @@ bool SMESH_MeshEditor::Remove (const list< int >& theIDs,
|
|||||||
(*smIt)->ComputeStateEngine( SMESH_subMesh::MESH_ENTITY_REMOVED );
|
(*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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user