mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 02:10:35 +05:00
PPGP
In TSearchersDeleter fix setting/removing the event listener
This commit is contained in:
parent
df70ba0baf
commit
ccb0d68b6f
@ -227,22 +227,22 @@ namespace MeshEditor_I {
|
|||||||
}
|
}
|
||||||
myMesh = mesh;
|
myMesh = mesh;
|
||||||
myMeshPartIOR = meshPartIOR;
|
myMeshPartIOR = meshPartIOR;
|
||||||
if ( SMESH_subMesh* myMainSubMesh = mesh->GetSubMeshContaining(1) ) {
|
SMESH_subMesh* sm = mesh->GetSubMesh( mesh->GetShapeToMesh() );
|
||||||
const TDependsOnMap & subMeshes = myMainSubMesh->DependsOn();
|
SMESH_subMeshIteratorPtr smIt = sm->getDependsOnIterator( /*includeSelf=*/true );
|
||||||
TDependsOnMap::const_iterator sm;
|
while ( smIt->more() )
|
||||||
for (sm = subMeshes.begin(); sm != subMeshes.end(); sm++)
|
{
|
||||||
sm->second->SetEventListener( this, 0, sm->second );
|
sm = smIt->next();
|
||||||
|
sm->SetEventListener( this, 0, sm );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//!< delete self from all submeshes
|
//!< delete self from all submeshes
|
||||||
void Unset(SMESH_Mesh* mesh)
|
void Unset(SMESH_Mesh* mesh)
|
||||||
{
|
{
|
||||||
if ( SMESH_subMesh* myMainSubMesh = mesh->GetSubMeshContaining(1) ) {
|
if ( SMESH_subMesh* sm = mesh->GetSubMeshContaining(1) ) {
|
||||||
const TDependsOnMap & subMeshes = myMainSubMesh->DependsOn();
|
SMESH_subMeshIteratorPtr smIt = sm->getDependsOnIterator( /*includeSelf=*/true );
|
||||||
TDependsOnMap::const_iterator sm;
|
while ( smIt->more() )
|
||||||
for (sm = subMeshes.begin(); sm != subMeshes.end(); sm++)
|
smIt->next()->DeleteEventListener( this );
|
||||||
sm->second->DeleteEventListener( this );
|
|
||||||
}
|
}
|
||||||
myMesh = 0;
|
myMesh = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user