From: vsr Date: Wed, 22 Jun 2005 15:23:32 +0000 (+0000) Subject: Fix a bug with SWIG 1.3.24 - the swigged library should be loaded only once to the... X-Git-Tag: T3_0_0_a4~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d91bc9f4fc9c64998ca72d5bdf87ada85ce3eb5b;p=modules%2Fkernel.git Fix a bug with SWIG 1.3.24 - the swigged library should be loaded only once to the Python interpreter --- diff --git a/src/KERNEL_PY/kernel_shared_modules.py b/src/KERNEL_PY/kernel_shared_modules.py index 76129eecd..b218ef6d3 100755 --- a/src/KERNEL_PY/kernel_shared_modules.py +++ b/src/KERNEL_PY/kernel_shared_modules.py @@ -10,6 +10,7 @@ from import_hook import register_pattern register_name("qt") register_pattern(lambda(x):x.endswith("_idl")) +register_pattern(lambda(x):x.endswith("_Swig")) register_name("omniORB") import omniORB diff --git a/src/KERNEL_PY/salome_iapp.py b/src/KERNEL_PY/salome_iapp.py index befa0d075..e6ebcaf16 100644 --- a/src/KERNEL_PY/salome_iapp.py +++ b/src/KERNEL_PY/salome_iapp.py @@ -24,7 +24,6 @@ # Module : SALOME # $Header$ -from libSALOME_Swig import * import salome_ComponentGUI #-------------------------------------------------------------------------- @@ -54,9 +53,6 @@ def SalomeGUIgetAllSelected(self): listSelected.append(self.getSelected(i)) return listSelected -class SalomeGUI(SALOMEGUI_Swig): - getAllSelected = SalomeGUIgetAllSelected - #-------------------------------------------------------------------------- salome_iapp_initial = 1 @@ -67,8 +63,12 @@ def salome_iapp_init(): if salome_iapp_initial: salome_iapp_initial=0 + import libSALOME_Swig + class SalomeGUI(libSALOME_Swig.SALOMEGUI_Swig): + getAllSelected = SalomeGUIgetAllSelected + # create a SALOMEGUI_Swig instance sg = SalomeGUI() - IN_SALOME_GUI=sg.hasDesktop() + IN_SALOME_GUI = sg.hasDesktop() return sg