X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHDS%2FSMESHDS_GroupOnFilter.cxx;h=32bd8c7f3485553f1dcb7cc7e7bfd4bba304db29;hp=3c2b2a36b46035d210c88949fa5f1fa214ece837;hb=d4a710ce52f6e76786a7b3845e2f7975dc9a00b1;hpb=2d179048e3c7bdf2c4ab3aa3738bed58ea4fb9c4 diff --git a/src/SMESHDS/SMESHDS_GroupOnFilter.cxx b/src/SMESHDS/SMESHDS_GroupOnFilter.cxx index 3c2b2a36b..32bd8c7f3 100644 --- a/src/SMESHDS/SMESHDS_GroupOnFilter.cxx +++ b/src/SMESHDS/SMESHDS_GroupOnFilter.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -135,6 +135,17 @@ int SMESHDS_GroupOnFilter::GetTic() const return GetMesh()->GetMTime() * myPredicateTic; } +//================================================================================ +/*! + * \brief Return false if update() is needed + */ +//================================================================================ + +bool SMESHDS_GroupOnFilter::IsUpToDate() const +{ + return !( myMeshModifTime < GetMesh()->GetMTime() ); +} + //================================================================================ /*! * \brief Updates myElements if necessary @@ -143,7 +154,7 @@ int SMESHDS_GroupOnFilter::GetTic() const void SMESHDS_GroupOnFilter::update() const { - if ( myMeshModifTime < GetMesh()->GetMTime() ) + if ( !IsUpToDate() ) { SMESHDS_GroupOnFilter* me = const_cast( this ); me->myElements.clear();