]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
WIP
authorAnthony Geay <anthony.geay@edf.fr>
Wed, 13 Jan 2021 16:39:42 +0000 (17:39 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Wed, 13 Jan 2021 16:39:42 +0000 (17:39 +0100)
src/GEOM_I/GEOM_Gen_i.cc
src/GEOM_SWIG/geomBuilder.py

index a59018f9114ed9c8226a6072f38a06ffbcadcef3..8294ce0ce215fc1fec1bd88a676559db7a6be679 100644 (file)
@@ -65,6 +65,7 @@
 
 #include <SALOMEDS_Tool.hxx>
 #include <SALOMEDS_wrap.hxx>
+#include "SALOMEDS_Study_i.hxx"
 #include <Basics_DirUtils.hxx>
 #include <Basics_Utils.hxx>
 
@@ -2174,12 +2175,7 @@ void GEOM_Gen_i::register_name(char * name)
 //============================================================================
 SALOMEDS::Study_var GEOM_Gen_i::getStudyServant()
 {
-  static SALOMEDS::Study_var aStudy;
-  if(CORBA::is_nil(aStudy)){
-    CORBA::Object_ptr anObject = name_service->Resolve("/Study");
-    aStudy = SALOMEDS::Study::_narrow(anObject);
-  }
-  return aStudy;
+  return SALOMEDS::Study::_duplicate(KERNEL::getStudyServantSA());
 }
 
 //============================================================================
index 2e256ddb9305388ed3382b1bd73ebe3f0730e976..0974aed9808e1ffcf13645b46e5c3664ef76abd2 100644 (file)
@@ -860,7 +860,7 @@ class geomBuilder(GEOM._objref_GEOM_Gen):
             self.GroupOp  = self.GetIGroupOperations    ()
             self.FieldOp  = self.GetIFieldOperations    ()
 
-            notebook.myStudy = salome.myStudy
+            notebook.myStudy = self.myStudy
             pass
 
         def GetPluginOperations(self, libraryName):