From: vsr Date: Wed, 6 May 2009 08:41:37 +0000 (+0000) Subject: Issue 0020342: EDF 1025 GUI: Impossible to choose the container for a Python module X-Git-Tag: V5_1_2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5da6010744274e103aa0a16ceebc12e56e369429;p=samples%2Fpyhello.git Issue 0020342: EDF 1025 GUI: Impossible to choose the container for a Python module --- 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 ################################################