Salome HOME
0020321: EDF : Some windows do not appear depending on the platform (MinimumSizeHint())
[modules/smesh.git] / src / SMESHGUI / SMESHGUI.cxx
index 50f44fb18b8fc5def2e34667645a29a6df991ce4..4af6cf398b395e4c5fc811bf83d530f41fa85b84 100644 (file)
@@ -1063,7 +1063,8 @@ SMESH::SMESH_Gen_var SMESHGUI::myComponentSMESH = SMESH::SMESH_Gen::_nil();
  */
 //=============================================================================
 SMESHGUI::SMESHGUI() :
-SalomeApp_Module( "SMESH" )
+SalomeApp_Module( "SMESH" ),
+LightApp_Module( "SMESH" )
 {
   if ( CORBA::is_nil( myComponentSMESH ) )
   {
@@ -3319,6 +3320,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;
 }