From: imn Date: Thu, 8 Dec 2016 11:55:38 +0000 (+0300) Subject: Fixed problem with study after re-initialization (Clear, Init) study. X-Git-Tag: Before_python3_27062017~1^2~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ec10480a3deb8b7965ba8a5dce70f17a93c7e292;p=modules%2Fkernel.git Fixed problem with study after re-initialization (Clear, Init) study. --- 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()); + } + } //============================================================================