X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMDS%2FSMDS_MeshGroup.cxx;h=842e6c2845fef39e24f9a5b3bb33541b3f010e42;hb=c9ccfc74e0ad0568e8f42239ec680b0c6ad624f8;hp=053d917b7fccf4083a5578e93c885ed03db143d3;hpb=6a77e2f8473fe29e14c3cd1aa8fd45eb6361fe0b;p=modules%2Fsmesh.git diff --git a/src/SMDS/SMDS_MeshGroup.cxx b/src/SMDS/SMDS_MeshGroup.cxx index 053d917b7..842e6c284 100644 --- a/src/SMDS/SMDS_MeshGroup.cxx +++ b/src/SMDS/SMDS_MeshGroup.cxx @@ -41,7 +41,7 @@ using namespace std; SMDS_MeshGroup::SMDS_MeshGroup(const SMDS_Mesh * theMesh, const SMDSAbs_ElementType theType) - :myMesh(theMesh),myType(theType), myParent(NULL) + :myMesh(theMesh),myType(theType), myParent(NULL), myTic(0) { } @@ -112,8 +112,9 @@ bool SMDS_MeshGroup::RemoveFromParent() void SMDS_MeshGroup::Clear() { - myElements.clear(); - myType = SMDSAbs_All; + myElements.clear(); + myType = SMDSAbs_All; + ++myTic; } //======================================================================= @@ -123,14 +124,15 @@ void SMDS_MeshGroup::Clear() void SMDS_MeshGroup::Add(const SMDS_MeshElement * theElem) { - // the type of the group is determined by the first element added - if (myElements.empty()) myType = theElem->GetType(); - else if (theElem->GetType() != myType) { - MESSAGE("SMDS_MeshGroup::Add : Type Mismatch "<GetType()<<"!="<GetType(); + else if (theElem->GetType() != myType) { + MESSAGE("SMDS_MeshGroup::Add : Type Mismatch "<GetType()<<"!="<::iterator found - = myElements.find(theElem); + set::iterator found = myElements.find(theElem); if ( found != myElements.end() ) { myElements.erase(found); if (myElements.empty()) myType = SMDSAbs_All; + ++myTic; return true; } return false;