]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0020210: EDF SMESH 976: Update of a smesh group after modification of the associated...
authorvsr <vsr@opencascade.com>
Tue, 14 Apr 2009 12:12:27 +0000 (12:12 +0000)
committervsr <vsr@opencascade.com>
Tue, 14 Apr 2009 12:12:27 +0000 (12:12 +0000)
Additional patch: do not publish SMESH component automatically on the module activation

src/SMESH_I/SMESH_Gen_i.cxx

index c38eb14193fa4fea6332c58c4219beac106615bb..d116d5a77afca5bb1c308ff7097f795116512443 100644 (file)
@@ -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<SMESH_Mesh_i*>( 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<SMESH_Mesh_i*>( ior ))
+           mesh->CheckGeomGroupModif();
+       }
       }
     }
   }