]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Deleted study parameter
authormpa <mpa@opencascade.com>
Fri, 3 Feb 2017 13:07:33 +0000 (16:07 +0300)
committermpa <mpa@opencascade.com>
Fri, 3 Feb 2017 13:07:33 +0000 (16:07 +0300)
src/KERNEL_PY/kernel/services.py
src/KERNEL_PY/salome_notebook.py
src/KERNEL_PY/salome_test.py

index b1b3db9c1e21276e9bf9943b3b9a8e1bb499e546..c8ab30236bf2b85727194c0a1a198965afa38e48 100644 (file)
@@ -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' )
index 12ac01b8231171e5128b2972051d88d5c3e2f184..b6c4765a32d7636b5ea1e5f28bb7f6aa7b551f05 100644 (file)
@@ -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()
index 8902e461dcf06a82e68a13a728f31a5f55e2a702..58d8ad6f0c6a25d1ce3cef24af79ee824b54a6f8 100755 (executable)
@@ -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