From: vsr Date: Wed, 6 May 2009 14:54:16 +0000 (+0000) Subject: 0020210: EDF SMESH 976: Update of a smesh group after modification of the associated... X-Git-Tag: V4_1_0_maintainance_FINAL~94 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=2466d1b5d3ec3d4f38b5d53c3c9c9e5b3a8b7278;ds=sidebyside 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 c0850c707..25f62dee3 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -575,13 +575,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(); + } } } }