mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-27 14:20:32 +05:00
PAL6825
This commit is contained in:
parent
4101a1ce54
commit
92595f0080
@ -93,6 +93,7 @@ bool SMESHDS_Group::Add (const int theID)
|
|||||||
SetType( aElem->GetType() );
|
SetType( aElem->GetType() );
|
||||||
|
|
||||||
myGroup.Add (aElem);
|
myGroup.Add (aElem);
|
||||||
|
resetIterator();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,6 +109,7 @@ bool SMESHDS_Group::Remove (const int theID)
|
|||||||
if (!aElem || !myGroup.Contains(aElem))
|
if (!aElem || !myGroup.Contains(aElem))
|
||||||
return false;
|
return false;
|
||||||
myGroup.Remove (aElem);
|
myGroup.Remove (aElem);
|
||||||
|
resetIterator();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,6 +121,7 @@ bool SMESHDS_Group::Remove (const int theID)
|
|||||||
void SMESHDS_Group::Clear()
|
void SMESHDS_Group::Clear()
|
||||||
{
|
{
|
||||||
myGroup.Clear();
|
myGroup.Clear();
|
||||||
|
resetIterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
// =====================
|
// =====================
|
||||||
|
@ -41,7 +41,7 @@ SMESHDS_GroupBase::SMESHDS_GroupBase (const int theID,
|
|||||||
const SMESHDS_Mesh* theMesh,
|
const SMESHDS_Mesh* theMesh,
|
||||||
const SMDSAbs_ElementType theType):
|
const SMDSAbs_ElementType theType):
|
||||||
myID(theID), myMesh(theMesh), myType(theType), myStoreName(""),
|
myID(theID), myMesh(theMesh), myType(theType), myStoreName(""),
|
||||||
myCurIndex(0), myCurID(0)
|
myCurIndex(0), myCurID(-1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,6 +86,18 @@ const SMDS_MeshElement* SMESHDS_GroupBase::findInMesh (const int theID) const
|
|||||||
return aElem;
|
return aElem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=============================================================================
|
||||||
|
/*!
|
||||||
|
* Internal method: resets cached iterator, should be called by ancestors
|
||||||
|
* when they are modified (ex: Add() or Remove() )
|
||||||
|
*/
|
||||||
|
//=============================================================================
|
||||||
|
void SMESHDS_GroupBase::resetIterator()
|
||||||
|
{
|
||||||
|
myCurIndex = 0;
|
||||||
|
myCurID = -1;
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : Extent
|
//function : Extent
|
||||||
//purpose :
|
//purpose :
|
||||||
|
@ -68,6 +68,7 @@ class SMESHDS_GroupBase
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
const SMDS_MeshElement* findInMesh (const int theID) const;
|
const SMDS_MeshElement* findInMesh (const int theID) const;
|
||||||
|
void resetIterator();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SMESHDS_GroupBase (const SMESHDS_GroupBase& theOther);
|
SMESHDS_GroupBase (const SMESHDS_GroupBase& theOther);
|
||||||
|
Loading…
Reference in New Issue
Block a user