]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Minor bug fix: IN_SALOME_GUI should not be reset if already set.
authorabn <adrien.bruneton@cea.fr>
Tue, 14 Oct 2014 14:19:39 +0000 (16:19 +0200)
committerabn <adrien.bruneton@cea.fr>
Tue, 14 Oct 2014 14:19:39 +0000 (16:19 +0200)
src/KERNEL_PY/salome_iapp.py

index 6aa3c9f5eed38a1a4a6a69e2674602992e38540d..75c0ad4b3fa68fe78f1438c4a8b61f904bbe944e 100755 (executable)
@@ -32,7 +32,7 @@ import salome_ComponentGUI
 
     #--------------------------------------------------------------------------
 
-IN_SALOME_GUI=0
+IN_SALOME_GUI=None
 
 def ImportComponentGUI(ComponentName):
     if IN_SALOME_GUI:
@@ -174,11 +174,13 @@ def salome_iapp_init(embedded):
 
             # create a SALOMEGUI_Swig instance
             sg = SalomeGUI()
-            IN_SALOME_GUI = sg.hasDesktop()
+            inSalomeGUI = sg.hasDesktop()
         else:
             # Not embedded in GUI
             sg=SalomeOutsideGUI()
-            IN_SALOME_GUI=0
+            inSalomeGUI=0
+        if IN_SALOME_GUI is None:
+          IN_SALOME_GUI = inSalomeGUI
     return sg
 
 def salome_iapp_close():