From: barate Date: Fri, 11 Feb 2011 13:24:50 +0000 (+0000) Subject: Removed studyId in salome.kernel.varlist functions (now get it from SObject) X-Git-Tag: Start_BR_19998_21191~74 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e65fd4fcff38418fd003e30e2ebf037cba14e75f;p=modules%2Fkernel.git Removed studyId in salome.kernel.varlist functions (now get it from SObject) --- 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: