]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Send message to GUI that study was created to manage of 'Connect' action availability...
authorakl <alexander.kovalev@opencascade.com>
Thu, 25 Sep 2014 06:21:30 +0000 (10:21 +0400)
committerakl <alexander.kovalev@opencascade.com>
Thu, 25 Sep 2014 06:21:30 +0000 (10:21 +0400)
src/SALOMEDS/SALOMEDS_Study_i.cxx

index 2bc96b593a14b819e1a9931e23a991bd1c4fd8ba..200a8b5acb463d87395dac47582080ab236018ba 100644 (file)
@@ -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());
+  }
 }
   
 //============================================================================