From: mpa Date: Fri, 3 Feb 2017 13:07:33 +0000 (+0300) Subject: Deleted study parameter X-Git-Tag: Before_python3_27062017~1^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=99a3484eaa2d8b36cea9cb02542c1a0b7108feaf;p=modules%2Fkernel.git Deleted study parameter --- diff --git a/src/KERNEL_PY/kernel/services.py b/src/KERNEL_PY/kernel/services.py index b1b3db9c1..c8ab30236 100644 --- a/src/KERNEL_PY/kernel/services.py +++ b/src/KERNEL_PY/kernel/services.py @@ -236,7 +236,7 @@ def TEST_createObject(): """ import GEOM from salome.geom import geomBuilder - geompy = geomBuilder.New(salome.myStudy) + geompy = geomBuilder.New() box = geompy.MakeBoxDXDYDZ(200, 200, 200) id = geompy.addToStudy( box, 'box' ) diff --git a/src/KERNEL_PY/salome_notebook.py b/src/KERNEL_PY/salome_notebook.py index 12ac01b82..b6c4765a3 100644 --- a/src/KERNEL_PY/salome_notebook.py +++ b/src/KERNEL_PY/salome_notebook.py @@ -69,8 +69,11 @@ class PseudoStudyForNoteBook(object): class NoteBook: - def __init__(self, Study): - self.myStudy = Study + def __init__(self, theIsEnablePublish = True): + if theIsEnablePublish: + self.myStudy = salome.myStudy + else: + self.myStudy = PseudoStudyForNoteBook() def set(self, variableName, variable): """ @@ -171,9 +174,8 @@ class NoteBook: pass def checkThisNoteBook(**kwargs): - study = PseudoStudyForNoteBook(**kwargs) - note_book = NoteBook(study) + note_book = NoteBook( False ) note_book.check() return -notebook = NoteBook(salome.myStudy) +notebook = NoteBook() diff --git a/src/KERNEL_PY/salome_test.py b/src/KERNEL_PY/salome_test.py index 8902e461d..58d8ad6f0 100755 --- a/src/KERNEL_PY/salome_test.py +++ b/src/KERNEL_PY/salome_test.py @@ -112,7 +112,7 @@ print " %d. Test Geometry " % step; step+=1 print "======================================================================" from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() ShapeTypeCompSolid = 1 ShapeTypeSolid = 2