From afaa84f60c9f9fc36746bc1e923a0823f410f239 Mon Sep 17 00:00:00 2001 From: salome <> Date: Thu, 8 Dec 2005 15:59:39 +0000 Subject: [PATCH] =?utf8?q?modification=20des=20m=C3=A9thodes=20de=20lancem?= =?utf8?q?ent=20de=20eficas.=20control=20du=20popup=20(=20clique=20droit?= =?utf8?q?=20):=20v=C3=A9rifie=20que=20l'item=20s=C3=A9lectionn=C3=A9=20es?= =?utf8?q?t=20bien=20un=20fichier=20eficas.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/EFICASGUI/EFICASGUI.py | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/src/EFICASGUI/EFICASGUI.py b/src/EFICASGUI/EFICASGUI.py index cf88dce8..e633072c 100644 --- a/src/EFICASGUI/EFICASGUI.py +++ b/src/EFICASGUI/EFICASGUI.py @@ -112,13 +112,20 @@ def activeStudyChanged(ID): studyManager.palStudy.setCurrentStudyID( currentStudyId ) #CS_pbruno -def definePopup(theContext, theObject, theParent): +def definePopup(theContext, theObject, theParent): print "EFICASGUI --- definePopup" - theContext = "" + theContext= "" + theObject = "100" theParent = "ObjectBrowser" a=salome.sg.getAllSelected() - if len(a) >0: - theObject="73" + print a + + selectedEntry = a[0] + aType, aValue = studyManager.palStudy.getTypeAndValue( selectedEntry ) + + if aType == studyManager.FICHIER_EFICAS_ASTER or aType == studyManager.FICHIER_EFICAS_HOMARD: + theObject="73" + return (theContext, theObject, theParent) @@ -139,23 +146,23 @@ def runEficas(): print currentStudyId #eficasSalome.runEficas("ASTER",studyId=currentStudyId) #ws = sgPyQt.getMainFrame() - desktop=sgPyQt.getDesktop() - eficasSalome.runEficas( desktop, studyManager.palStudy, "ASTER" ) + #desktop=sgPyQt.getDesktop() + eficasSalome.runEficas( "ASTER" ) def runEficaspourHomard(): print "runEficas" #eficasSalome.runEficas("HOMARD") desktop=sgPyQt.getDesktop() - eficasSalome.runEficas( desktop, studyManager.palStudy, "HOMARD" ) + eficasSalome.runEficas( "HOMARD" ) def runEficasHomard(): print "runEficas" #eficasSalome.runEficas("HOMARD") - desktop=sgPyQt.getDesktop() - eficasSalome.runEficas( desktop, studyManager.palStudy, "HOMARD" ) + #desktop=sgPyQt.getDesktop() + eficasSalome.runEficas( "HOMARD" ) @@ -182,8 +189,8 @@ def runEficasFichier(): code = "HOMARD" if code: #eficasSalome.runEficas(code,attr,studyId=currentStudyId) - desktop=sgPyQt.getDesktop() - eficasSalome.runEficas( desktop, studyManager.palStudy, code, fileName ) + #desktop=sgPyQt.getDesktop() + eficasSalome.runEficas( code, fileName ) -- 2.39.2