]> 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:52 +0000 (14:26 +0000)
committereap <eap@opencascade.com>
Fri, 3 Apr 2009 14:26:52 +0000 (14:26 +0000)
    Make SMESH_Gen update meshes at switching GEOM->SMESH

src/SMESHGUI/SMESHGUI.cxx

index 723aec577c2289779ab6e195c911d3bcea7f1c85..d9ee51032f477d8736a2253a8c2fcff21d46c7df 100644 (file)
@@ -3252,6 +3252,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;
 }