From ec10480a3deb8b7965ba8a5dce70f17a93c7e292 Mon Sep 17 00:00:00 2001 From: imn Date: Thu, 8 Dec 2016 14:55:38 +0300 Subject: [PATCH] Fixed problem with study after re-initialization (Clear, Init) study. --- src/SALOMEDS/SALOMEDS_Study_i.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/SALOMEDS/SALOMEDS_Study_i.cxx b/src/SALOMEDS/SALOMEDS_Study_i.cxx index 24c8c6626..08fc42dcb 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.cxx @@ -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()); + } + } //============================================================================ -- 2.39.2