From 436838c202eec98c3e375b153b366878426ea01a Mon Sep 17 00:00:00 2001 From: akl Date: Wed, 24 Apr 2013 13:13:40 +0000 Subject: [PATCH] Fix to avoid dependence of mesh on itself (it leaded to cycle in 'SetRemovedFromStudy'). --- src/SMESH_I/SMESH_2smeshpy.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SMESH_I/SMESH_2smeshpy.cxx b/src/SMESH_I/SMESH_2smeshpy.cxx index 7d5e9f23e..20cc26043 100644 --- a/src/SMESH_I/SMESH_2smeshpy.cxx +++ b/src/SMESH_I/SMESH_2smeshpy.cxx @@ -2011,7 +2011,7 @@ void _pyMesh::ClearCommands() void _pyMesh::addFatherMesh( const _pyID& meshID ) { - if ( !meshID.IsEmpty() ) + if ( !meshID.IsEmpty() && meshID != GetID() ) addFatherMesh( Handle(_pyMesh)::DownCast( theGen->FindObject( meshID ))); } @@ -2023,7 +2023,7 @@ void _pyMesh::addFatherMesh( const _pyID& meshID ) void _pyMesh::addFatherMesh( const Handle(_pyMesh)& mesh ) { - if ( !mesh.IsNull() ) + if ( !mesh.IsNull() && mesh->GetID() != GetID() ) { //myFatherMeshes.push_back( mesh ); mesh->myChildMeshes.push_back( this ); -- 2.39.2