Salome HOME
Join BR-D5-38-2003
[modules/smesh.git] / src / SMESHGUI / SMESHGUI.cxx
index 5cb83fcc3045f6a45b81549d0d80cadd6d4c79ca..8be5d69b22f4829d594f9c42bdf664b5c1f281b0 100644 (file)
@@ -1070,6 +1070,10 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
   if( !mgr )
     return false;
 
+  if (CORBA::is_nil(GetSMESHGen()->GetCurrentStudy())) {
+    GetSMESHGen()->SetCurrentStudy(_CAST(Study,aStudy)->GetStudy());
+  }
+
   SUIT_ViewWindow* view = application()->desktop()->activeWindow();
   SVTK_ViewWindow* vtkwnd = dynamic_cast<SVTK_ViewWindow*>( view );