From e65fd4fcff38418fd003e30e2ebf037cba14e75f Mon Sep 17 00:00:00 2001 From: barate Date: Fri, 11 Feb 2011 13:24:50 +0000 Subject: [PATCH] Removed studyId in salome.kernel.varlist functions (now get it from SObject) --- src/KERNEL_PY/kernel/varlist.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/KERNEL_PY/kernel/varlist.py b/src/KERNEL_PY/kernel/varlist.py index 64488066e..bad8e2068 100644 --- a/src/KERNEL_PY/kernel/varlist.py +++ b/src/KERNEL_PY/kernel/varlist.py @@ -22,18 +22,19 @@ from studyedit import getStudyEditor DEFAULT_NAME = "Variables" def createVarListObj(fatherSobj, inputVarList = [], outputVarList = [], - studyId = None, name = DEFAULT_NAME, icon = None, - typeId = None): + name = DEFAULT_NAME, icon = None, typeId = None): + studyId = fatherSobj.GetStudy()._get_StudyId() editor = getStudyEditor(studyId) - sObj = editor.createItem(fatherSobj, + sobj = editor.createItem(fatherSobj, name = name, icon = icon, typeId = typeId) - attr = editor.builder.FindOrCreateAttribute(sObj, "AttributeParameter") + attr = editor.builder.FindOrCreateAttribute(sobj, "AttributeParameter") attr.SetStrArray("inputVarList", inputVarList) attr.SetStrArray("outputVarList", outputVarList) -def getVarList(sobj, studyId = None): +def getVarList(sobj): + studyId = sobj.GetStudy()._get_StudyId() editor = getStudyEditor(studyId) (found, attr) = editor.builder.FindAttribute(sobj, "AttributeParameter") if not found: -- 2.39.2