mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-15 21:23:06 +05:00
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:
parent
86b667c6a5
commit
3b74875d9a
@ -2073,10 +2073,16 @@ 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 )
|
||||
{
|
||||
l_d->first->ProcessEvent( event, eventType, this, l_d->second, hyp );
|
||||
l_d->first->myBusySM.erase( this );
|
||||
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 )
|
||||
{
|
||||
li_da.first->ProcessEvent( event, eventType, this, li_da.second, hyp );
|
||||
li_da.first->myBusySM.erase( this );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user