From f1840849c524655ee5b6f5d1599a7698d28129d3 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Wed, 13 Jan 2021 17:39:42 +0100 Subject: [PATCH] WIP --- src/GEOM_I/GEOM_Gen_i.cc | 8 ++------ src/GEOM_SWIG/geomBuilder.py | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/GEOM_I/GEOM_Gen_i.cc b/src/GEOM_I/GEOM_Gen_i.cc index a59018f91..8294ce0ce 100644 --- a/src/GEOM_I/GEOM_Gen_i.cc +++ b/src/GEOM_I/GEOM_Gen_i.cc @@ -65,6 +65,7 @@ #include #include +#include "SALOMEDS_Study_i.hxx" #include #include @@ -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()); } //============================================================================ diff --git a/src/GEOM_SWIG/geomBuilder.py b/src/GEOM_SWIG/geomBuilder.py index 2e256ddb9..0974aed98 100644 --- a/src/GEOM_SWIG/geomBuilder.py +++ b/src/GEOM_SWIG/geomBuilder.py @@ -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): -- 2.39.2