]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Some fixes about study_close() method
authormpa <mpa@opencascade.com>
Thu, 25 Sep 2014 11:29:11 +0000 (15:29 +0400)
committermpa <mpa@opencascade.com>
Thu, 25 Sep 2014 11:29:11 +0000 (15:29 +0400)
src/KERNEL_PY/__init__.py

index 6d36a78e00ab501f4bdf4ce67a09cdcc3d153faa..6d9cdd23b647700c9e99fc092d134dac499a5c82 100755 (executable)
@@ -241,21 +241,20 @@ def salome_init(theStudyId=0,embedded=0):
     
 def study_close():
     global myStudy
-    if salome_study.myStudy:
-        global myStudyId, myStudyName
+    if myStudy:
         myStudy.Close()
-        salome_study_close()
-        myStudyId, myStudy, myStudyName=None,None,None
+        salome_close()
     else:
         raise RuntimeError, "Study is already closed!"
     pass
 
 def salome_close():
-    global salome_initial
+    global salome_initial, myStudy, myStudyId, myStudyName
     salome_initial=1
     salome_iapp_close()
     salome_kernel_close()
     salome_study_close()
+    myStudyId, myStudy, myStudyName=None,None,None
     pass