]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Fixed problem with study after re-initialization (Clear, Init) study.
authorimn <imn@opencascade.com>
Thu, 8 Dec 2016 11:55:38 +0000 (14:55 +0300)
committerimn <imn@opencascade.com>
Thu, 8 Dec 2016 11:55:38 +0000 (14:55 +0300)
src/SALOMEDS/SALOMEDS_Study_i.cxx

index 24c8c6626fa5c82a3c4ef61343fbf8fac5838ef1..08fc42dcb9f707004f23a5b422ecf5b7e485fff7 100644 (file)
@@ -288,6 +288,15 @@ void SALOMEDS_Study_i::Init()
     aSession->emitMessageOneWay(str.c_str());
     SALOMEDS::lock();
   }
+
+  std::string anIOR = _impl->GetTransientReference();
+  if ( anIOR.empty() ) {
+    CORBA::Object_var obj = aNamingService->Resolve("/Study");
+    SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow( obj );
+    CORBA::String_var IORStudy = _orb->object_to_string(aStudy);
+    _impl->SetTransientReference((char*)IORStudy.in());
+  }
+
 }
 
 //============================================================================