From: eap Date: Thu, 26 Jan 2012 15:32:57 +0000 (+0000) Subject: 0021338: EDF 1926 SMESH: New controls and filters X-Git-Tag: V6_5_0a1~171 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2d179048e3c7bdf2c4ab3aa3738bed58ea4fb9c4;p=modules%2Fsmesh.git 0021338: EDF 1926 SMESH: New controls and filters Call myPredicate->SetMesh( GetMesh() ) in order to let him update his data according to a changed mesh --- diff --git a/src/SMESHDS/SMESHDS_GroupOnFilter.cxx b/src/SMESHDS/SMESHDS_GroupOnFilter.cxx index 8307b279a..3c2b2a36b 100644 --- a/src/SMESHDS/SMESHDS_GroupOnFilter.cxx +++ b/src/SMESHDS/SMESHDS_GroupOnFilter.cxx @@ -149,6 +149,7 @@ void SMESHDS_GroupOnFilter::update() const me->myElements.clear(); if ( myPredicate ) { + myPredicate->SetMesh( GetMesh() ); // hope myPredicate updates self here if necessary me->myElements.reserve( GetMesh()->GetMeshInfo().NbElements(GetType())); SMDS_ElemIteratorPtr elIt = GetMesh()->elementsIterator(GetType()); while ( elIt->more() ) @@ -157,7 +158,8 @@ void SMESHDS_GroupOnFilter::update() const if ( myPredicate->IsSatisfy( e->GetID() )) me->myElements.push_back( e ); } - me->myElements.resize( myElements.size() ); + vector< const SMDS_MeshElement*> elems( me->myElements.begin(), me->myElements.end() ); + me->myElements.swap( elems ); } me->setChanged( false ); }