From: vsr Date: Tue, 14 Apr 2009 12:12:27 +0000 (+0000) Subject: 0020210: EDF SMESH 976: Update of a smesh group after modification of the associated... X-Git-Tag: V5_1_2rc1~62 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=66b8a7daf6c1e603799ad4bde0516932f123e599;p=modules%2Fsmesh.git 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 --- 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(); + } } } }