From 99a3484eaa2d8b36cea9cb02542c1a0b7108feaf Mon Sep 17 00:00:00 2001 From: mpa Date: Fri, 3 Feb 2017 16:07:33 +0300 Subject: [PATCH] Deleted study parameter --- src/KERNEL_PY/kernel/services.py | 2 +- src/KERNEL_PY/salome_notebook.py | 12 +++++++----- src/KERNEL_PY/salome_test.py | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) 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 -- 2.39.2