From 5da6010744274e103aa0a16ceebc12e56e369429 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 6 May 2009 08:41:37 +0000 Subject: [PATCH] Issue 0020342: EDF 1025 GUI: Impossible to choose the container for a Python module --- src/PYHELLO/PYHELLO_utils.py | 11 +++++++++++ src/PYHELLOGUI/PYHELLOGUI.py | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/PYHELLO/PYHELLO_utils.py b/src/PYHELLO/PYHELLO_utils.py index 03186fc..29442cd 100644 --- a/src/PYHELLO/PYHELLO_utils.py +++ b/src/PYHELLO/PYHELLO_utils.py @@ -37,6 +37,7 @@ __all__ = [ "getLCC", "getStudyManager", "getEngine", + "getEngineIOR", "findOrCreateComponent", "getObjectID", ] @@ -152,6 +153,16 @@ def getEngine(): pass return __engine__ +### +# Get PYHELLO engine IOR +### +def getEngineIOR(): + IOR = "" + if getORB() and getEngine(): + IOR = getORB().object_to_string( getEngine() ) + pass + return IOR + ### # Find or create PYHELLO component object in a study ### diff --git a/src/PYHELLOGUI/PYHELLOGUI.py b/src/PYHELLOGUI/PYHELLOGUI.py index 86a86de..e931a44 100644 --- a/src/PYHELLOGUI/PYHELLOGUI.py +++ b/src/PYHELLOGUI/PYHELLOGUI.py @@ -268,7 +268,7 @@ def createPopupMenu( popup, context ): ctx = _setContext( _getStudyId() ) study = _getStudy() selcount, selected = _getSelection() - print selcount, selected + if verbose() : print selcount, selected if selcount == 1: # one object is selected if moduleID() in selected: @@ -333,6 +333,12 @@ def viewClosed( viewID ): if verbose() : print "PYHELLOGUI.viewClosed(): %d" % viewID pass +# called when study is opened +# returns engine IOR +def engineIOR(): + if verbose() : print "PYHELLOGUI.engineIOR()" + return getEngineIOR() + ################################################ # GUI actions implementation ################################################ -- 2.30.2