]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0020210: EDF SMESH 976: Update of a smesh group after modification of the associated...
authoreap <eap@opencascade.com>
Fri, 3 Apr 2009 14:26:25 +0000 (14:26 +0000)
committereap <eap@opencascade.com>
Fri, 3 Apr 2009 14:26:25 +0000 (14:26 +0000)
    Make SMESH_Gen update meshes at switching GEOM->SMESH

src/SMESHGUI/SMESHGUI.cxx

index 50f44fb18b8fc5def2e34667645a29a6df991ce4..6105681a0150260a6bd91680fbae926c9e6708e5 100644 (file)
@@ -3319,6 +3319,12 @@ bool SMESHGUI::activateModule( SUIT_Study* study )
   action(  33)->setEnabled(true); // Delete: Key_Delete
   action(1101)->setEnabled(true); // Rename: Key_F2
 
+  //  0020210. Make SMESH_Gen update meshes at switching GEOM->SMESH
+  GetSMESHGen()->SetCurrentStudy(SALOMEDS::Study::_nil());
+  if ( SalomeApp_Study* s = dynamic_cast<SalomeApp_Study*>( study ))
+    if ( _PTR(Study) aStudy = s->studyDS())
+      GetSMESHGen()->SetCurrentStudy( _CAST(Study,aStudy)->GetStudy() );
+
   return res;
 }