Salome HOME
BugID IPAL9186: Modified method GetSMESHGen
[modules/smesh.git] / src / SMESHGUI / SMESHGUI.cxx
index 2f5e5f6221eff8b63e8cbc01ef7d4abc6ee9f9ee..2b1da3a9c13cf26b2272c6cafe73671271ba5e4a 100644 (file)
@@ -240,6 +240,8 @@ namespace{
                                QObject::tr("SMESH_BUT_OK"));
          wc.resume();
        }
+
+       SMESHGUI::GetSMESHGUI()->updateObjBrowser();
       }
       catch (const SALOME::SALOME_Exception& S_ex){
        wc.suspend();
@@ -3075,6 +3077,12 @@ void SMESHGUI::OnGUIEvent()
 
 SMESH::SMESH_Gen_var SMESHGUI::GetSMESHGen()
 {
+   
+  if ( CORBA::is_nil( myComponentSMESH ) )
+    {
+      SMESHGUI aGUI; //SRN BugID: IPAL9186: Create an instance of SMESHGUI to initialize myComponentSMESH
+      return aGUI.myComponentSMESH;
+    }  
   return myComponentSMESH;
 }