0021422: EDF 1963 SMESH: Viscous layer algorithm fails in some cases

In NotifyListenersOnEvent(), enable removal of a listener from
   myEventListeners by its ProcessEvent()
This commit is contained in:
eap 2011-11-30 13:47:05 +00:00
parent 86b667c6a5
commit 3b74875d9a

View File

@ -2073,11 +2073,17 @@ void SMESH_subMesh::NotifyListenersOnEvent( const int event,
{
map< EventListener*, EventListenerData* >::iterator l_d = myEventListeners.begin();
for ( ; l_d != myEventListeners.end(); ++l_d )
if ( (*l_d).first->myBusySM.insert( this ).second )
{
std::pair< EventListener*, EventListenerData* > li_da = *l_d; /* copy to enable removal
of a listener from
myEventListeners by
its ProcessEvent() */
if ( li_da.first->myBusySM.insert( this ).second )
{
l_d->first->ProcessEvent( event, eventType, this, l_d->second, hyp );
l_d->first->myBusySM.erase( this );
li_da.first->ProcessEvent( event, eventType, this, li_da.second, hyp );
li_da.first->myBusySM.erase( this );
}
}
}
//================================================================================