]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fix bug in studyedit V6_4_0b1
authorbarate <barate>
Thu, 3 Nov 2011 17:15:15 +0000 (17:15 +0000)
committerbarate <barate>
Thu, 3 Nov 2011 17:15:15 +0000 (17:15 +0000)
src/KERNEL_PY/kernel/studyedit.py

index f31c6ede641532afea89b8d6735b5ec208ffd260..8d7c1a3ab4c324247b32e30c5c629caedcb063b5 100644 (file)
@@ -40,9 +40,13 @@ def getActiveStudyId():
     ``salome.myStudyId`` variable.
     """
     salome.salome_init()
-    # _GBO_WARN: note that salome.getActiveStudy() returns an id. It
-    # should return the study or be renammed in getActiveStudyId.
-    return salome.getActiveStudy()
+    # Warning: we don't use salome.getActiveStudy() here because it doesn't
+    # work properly when called from Salome modules (multi-study interpreter
+    # issue)
+    if salome.hasDesktop():
+        return salome.sg.getActiveStudyId()
+    else:
+        return salome.myStudyId
 
 def getActiveStudy():
     return salome.myStudyManager.GetStudyByID(getActiveStudyId())