From: akl Date: Thu, 25 Sep 2014 06:21:30 +0000 (+0400) Subject: Send message to GUI that study was created to manage of 'Connect' action availability... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6fe5685ae61a0b74e9258de789d80dbe09d244ef;p=modules%2Fkernel.git Send message to GUI that study was created to manage of 'Connect' action availability there. --- diff --git a/src/SALOMEDS/SALOMEDS_Study_i.cxx b/src/SALOMEDS/SALOMEDS_Study_i.cxx index 2bc96b593..200a8b5ac 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.cxx @@ -237,6 +237,18 @@ SALOMEDS_Study_i::SALOMEDS_Study_i(SALOMEDSImpl_Study* theImpl, theImpl->setNotifier(_notifier); theImpl->setGenObjRegister( _genObjRegister ); + + // Notify GUI that study was created + SALOME_NamingService *aNamingService = KERNEL::getNamingService(); + CORBA::Object_ptr obj = aNamingService->Resolve("/Kernel/Session"); + SALOME::Session_var aSession = SALOME::Session::_narrow(obj); + if ( !CORBA::is_nil(aSession) ) { + long studyId = aSession->GetActiveStudyId(); + std::stringstream ss; + ss << "studyCreated:" << studyId; + std::string str = ss.str(); + aSession->emitMessageOneWay(str.c_str()); + } } //============================================================================