fix SetEventListener() for the case of groups

This commit is contained in:
eap 2009-08-27 13:56:40 +00:00
parent 526c49467f
commit 7dba98132c

View File

@ -2036,7 +2036,7 @@ void StdMeshers_ProjectionUtils::SetEventListener(SMESH_subMesh* subMesh,
SMESH_Mesh* srcMesh) SMESH_Mesh* srcMesh)
{ {
// Set listener that resets an event listener on source submesh when // Set listener that resets an event listener on source submesh when
// "ProjectionSource*D" hypothesis is modified // "ProjectionSource*D" hypothesis is modified since source shape can be changed
subMesh->SetEventListener( GetHypModifWaiter(),0,subMesh); subMesh->SetEventListener( GetHypModifWaiter(),0,subMesh);
// Set an event listener to submesh of the source shape // Set an event listener to submesh of the source shape
@ -2056,6 +2056,8 @@ void StdMeshers_ProjectionUtils::SetEventListener(SMESH_subMesh* subMesh,
for (; it.More(); it.Next()) for (; it.More(); it.Next())
{ {
SMESH_subMesh* srcSM = srcMesh->GetSubMesh( it.Current() ); SMESH_subMesh* srcSM = srcMesh->GetSubMesh( it.Current() );
if ( srcSM != subMesh )
{
SMESH_subMeshEventListenerData* data = SMESH_subMeshEventListenerData* data =
srcSM->GetEventListenerData(GetSrcSubMeshListener()); srcSM->GetEventListenerData(GetSrcSubMeshListener());
if ( data ) if ( data )
@ -2065,6 +2067,7 @@ void StdMeshers_ProjectionUtils::SetEventListener(SMESH_subMesh* subMesh,
subMesh->SetEventListener ( GetSrcSubMeshListener(), data, srcSM ); subMesh->SetEventListener ( GetSrcSubMeshListener(), data, srcSM );
} }
} }
}
else else
{ {
subMesh->SetEventListener( GetSrcSubMeshListener(), subMesh->SetEventListener( GetSrcSubMeshListener(),