mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
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
This commit is contained in:
parent
1ffe72da8d
commit
2d179048e3
@ -149,6 +149,7 @@ void SMESHDS_GroupOnFilter::update() const
|
|||||||
me->myElements.clear();
|
me->myElements.clear();
|
||||||
if ( myPredicate )
|
if ( myPredicate )
|
||||||
{
|
{
|
||||||
|
myPredicate->SetMesh( GetMesh() ); // hope myPredicate updates self here if necessary
|
||||||
me->myElements.reserve( GetMesh()->GetMeshInfo().NbElements(GetType()));
|
me->myElements.reserve( GetMesh()->GetMeshInfo().NbElements(GetType()));
|
||||||
SMDS_ElemIteratorPtr elIt = GetMesh()->elementsIterator(GetType());
|
SMDS_ElemIteratorPtr elIt = GetMesh()->elementsIterator(GetType());
|
||||||
while ( elIt->more() )
|
while ( elIt->more() )
|
||||||
@ -157,7 +158,8 @@ void SMESHDS_GroupOnFilter::update() const
|
|||||||
if ( myPredicate->IsSatisfy( e->GetID() ))
|
if ( myPredicate->IsSatisfy( e->GetID() ))
|
||||||
me->myElements.push_back( e );
|
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 );
|
me->setChanged( false );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user