From: abn Date: Tue, 14 Oct 2014 14:19:39 +0000 (+0200) Subject: Minor bug fix: IN_SALOME_GUI should not be reset if already set. X-Git-Tag: V7_5_0b1~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1f1ad90bf0c2f9cb21b9f8c91d134ce20623d681;p=modules%2Fkernel.git Minor bug fix: IN_SALOME_GUI should not be reset if already set. --- diff --git a/src/KERNEL_PY/salome_iapp.py b/src/KERNEL_PY/salome_iapp.py index 6aa3c9f5e..75c0ad4b3 100755 --- a/src/KERNEL_PY/salome_iapp.py +++ b/src/KERNEL_PY/salome_iapp.py @@ -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():