X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHDS%2FSMESHDS_GroupBase.cxx;h=c4adcc53b6921a4ce7aeb6c6e789722b7cbfea1c;hb=2875648bdbc323df97bdb879b60673a2de776889;hp=c3fc31d7017c8df8c942e5fd963687665910caba;hpb=e4737e85f0da6d3f90fd08f6be1c2825195fe16f;p=modules%2Fsmesh.git diff --git a/src/SMESHDS/SMESHDS_GroupBase.cxx b/src/SMESHDS/SMESHDS_GroupBase.cxx index c3fc31d70..c4adcc53b 100644 --- a/src/SMESHDS/SMESHDS_GroupBase.cxx +++ b/src/SMESHDS/SMESHDS_GroupBase.cxx @@ -41,7 +41,7 @@ SMESHDS_GroupBase::SMESHDS_GroupBase (const int theID, const SMESHDS_Mesh* theMesh, const SMDSAbs_ElementType theType): 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; } +//============================================================================= +/*! + * 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 //purpose :