Salome HOME
BugID IPAL9186: Modified method GetSMESHGen
[modules/smesh.git] / src / SMESHGUI / SMESHGUI.cxx
index 1688eb8bd481694a490cfacc9dfb2e0545f5eeb3..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();
@@ -1352,6 +1354,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
                              tr("SMESH_WRN_VIEWER_VTK"),
                              tr("SMESH_BUT_OK"));
       }
+      updateObjBrowser();
       break;
     }
 
@@ -1894,6 +1897,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
           }
         }
       }
+      updateObjBrowser( true );
       break;
     }
 
@@ -2279,7 +2283,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
 
   }
 
-  updateObjBrowser();
+  //updateObjBrowser();
   return true;
 }
 
@@ -3073,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;
 }