X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHDS%2FSMESHDS_GroupBase.cxx;h=c4adcc53b6921a4ce7aeb6c6e789722b7cbfea1c;hp=c3fc31d7017c8df8c942e5fd963687665910caba;hb=92595f008083c36efe3fb4d5005655ef12582ad0;hpb=4101a1ce549537b58451d25379748e1b42c9b87c 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 :