mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 17:30:35 +05:00
fix SetEventListener() for the case of groups
This commit is contained in:
parent
526c49467f
commit
7dba98132c
@ -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,13 +2056,16 @@ 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() );
|
||||||
SMESH_subMeshEventListenerData* data =
|
if ( srcSM != subMesh )
|
||||||
srcSM->GetEventListenerData(GetSrcSubMeshListener());
|
{
|
||||||
if ( data )
|
SMESH_subMeshEventListenerData* data =
|
||||||
data->mySubMeshes.push_back( subMesh );
|
srcSM->GetEventListenerData(GetSrcSubMeshListener());
|
||||||
else
|
if ( data )
|
||||||
data = SMESH_subMeshEventListenerData::MakeData( subMesh );
|
data->mySubMeshes.push_back( subMesh );
|
||||||
subMesh->SetEventListener ( GetSrcSubMeshListener(), data, srcSM );
|
else
|
||||||
|
data = SMESH_subMeshEventListenerData::MakeData( subMesh );
|
||||||
|
subMesh->SetEventListener ( GetSrcSubMeshListener(), data, srcSM );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user