]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Notify GUI that study is closed.
authorakl <alexander.kovalev@opencascade.com>
Tue, 23 Sep 2014 08:21:50 +0000 (12:21 +0400)
committerakl <alexander.kovalev@opencascade.com>
Tue, 23 Sep 2014 08:21:50 +0000 (12:21 +0400)
src/SALOMEDS/CMakeLists.txt
src/SALOMEDS/SALOMEDS_Study_i.cxx

index bd54f4c287b32f325c6f9d3678daa8e7f7210bce..aef592069dca85f3705f2ab17da6230e02437171 100755 (executable)
@@ -27,6 +27,7 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_SOURCE_DIR}/../HDFPersist
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
+  ${CMAKE_CURRENT_SOURCE_DIR}/../KernelHelpers
   ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
   ${CMAKE_CURRENT_SOURCE_DIR}/../DF
   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMEDSImpl
@@ -51,6 +52,7 @@ SET(COMMON_LIBS
   SALOMELocalTrace
   SALOMEBasics
   SalomeHDFPersist
+  SalomeKernelHelpers
   DF
   SalomeDSImpl
   SalomeGenericObj
index 5bbc01b31cb8a13b4c32a9fbdf347175fafc5064..5e853fdcdd97d02b4c75628516bcfec89e17b713 100644 (file)
@@ -25,6 +25,7 @@
 //  Module : SALOME
 //
 #include "utilities.h"
+#include <sstream>
 #include "SALOMEDS_Study_i.hxx"
 #include "SALOMEDS_StudyManager_i.hxx"
 #include "SALOMEDS_UseCaseIterator_i.hxx"
@@ -48,6 +49,7 @@
 #include "DF_Attribute.hxx"
 
 #include "Basics_Utils.hxx"
+#include "SALOME_KernelServices.hxx"
 
 #ifdef WIN32
 #include <process.h>
@@ -884,6 +886,15 @@ void SALOMEDS_Study_i::Close()
   //Does not need any more this iterator
   itcomponent->UnRegister();
 
+  // Notify GUI that study is closed
+  SALOME::Session_var aSession = KERNEL::getSalomeSession();
+  if ( !CORBA::is_nil(aSession) ) {
+    long studyId = aSession->GetActiveStudyId();
+    std::stringstream ss;
+    ss << "studyClosed:" << studyId;
+    std::string str = ss.str();
+    aSession->emitMessage(str.c_str());
+  }
 
   _impl->Close();
 }