From 66b8a7daf6c1e603799ad4bde0516932f123e599 Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 14 Apr 2009 12:12:27 +0000 Subject: [PATCH] 0020210: EDF SMESH 976: Update of a smesh group after modification of the associated geom group Additional patch: do not publish SMESH component automatically on the module activation --- src/SMESH_I/SMESH_Gen_i.cxx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index c38eb1419..d116d5a77 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -577,13 +577,17 @@ void SMESH_Gen_i::SetCurrentStudy( SALOMEDS::Study_ptr theStudy ) // Let meshes update their data depending on GEOM groups that could change if ( curStudyId != studyId ) { - SALOMEDS::SComponent_var me = PublishComponent( myCurrentStudy ); - SALOMEDS::ChildIterator_var anIter = myCurrentStudy->NewChildIterator( me ); - for ( ; anIter->More(); anIter->Next() ) { - SALOMEDS::SObject_var so = anIter->Value(); - CORBA::Object_var ior = SObjectToObject( so ); - if ( SMESH_Mesh_i* mesh = SMESH::DownCast( ior )) - mesh->CheckGeomGroupModif(); + //SALOMEDS::SComponent_var me = PublishComponent( myCurrentStudy ); + SALOMEDS::SComponent_var me = SALOMEDS::SComponent::_narrow + ( myCurrentStudy->FindComponent( ComponentDataType() ) ); + if ( !me->_is_nil() ) { + SALOMEDS::ChildIterator_var anIter = myCurrentStudy->NewChildIterator( me ); + for ( ; anIter->More(); anIter->Next() ) { + SALOMEDS::SObject_var so = anIter->Value(); + CORBA::Object_var ior = SObjectToObject( so ); + if ( SMESH_Mesh_i* mesh = SMESH::DownCast( ior )) + mesh->CheckGeomGroupModif(); + } } } } -- 2.39.2