mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 18:20:34 +05:00
compact as soon as all elements removed
This commit is contained in:
parent
616481f67a
commit
b293f7af31
@ -140,7 +140,11 @@ bool SMESHDS_SubMesh::RemoveElement(const SMDS_MeshElement * ME, bool isElemDele
|
||||
if ((idInSubShape >= 0) && (idInSubShape < myElements.size()))
|
||||
{
|
||||
myElements[idInSubShape] = 0; // this vector entry is no more used
|
||||
myUnusedIdElements++;
|
||||
if ( ++myUnusedIdElements == (int) myElements.size() )
|
||||
{
|
||||
clearVector( myElements );
|
||||
myUnusedIdElements = 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -195,7 +199,11 @@ bool SMESHDS_SubMesh::RemoveNode(const SMDS_MeshNode * N, bool isNodeDeleted)
|
||||
if ((idInSubShape >= 0) && (idInSubShape < myNodes.size()))
|
||||
{
|
||||
myNodes[idInSubShape] = 0; // this vector entry is no more used
|
||||
myUnusedIdNodes++;
|
||||
if ( ++myUnusedIdNodes == (int) myNodes.size() )
|
||||
{
|
||||
clearVector( myNodes );
|
||||
myUnusedIdNodes = 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user