From 1f1ad90bf0c2f9cb21b9f8c91d134ce20623d681 Mon Sep 17 00:00:00 2001 From: abn Date: Tue, 14 Oct 2014 16:19:39 +0200 Subject: [PATCH] Minor bug fix: IN_SALOME_GUI should not be reset if already set. --- src/KERNEL_PY/salome_iapp.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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(): -- 2.39.2