From: akl Date: Tue, 23 Sep 2014 08:21:50 +0000 (+0400) Subject: Notify GUI that study is closed. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=09254bd6c0892c1d359c8f36245d7a71cca7adbd;p=modules%2Fkernel.git Notify GUI that study is closed. --- diff --git a/src/SALOMEDS/CMakeLists.txt b/src/SALOMEDS/CMakeLists.txt index bd54f4c28..aef592069 100755 --- a/src/SALOMEDS/CMakeLists.txt +++ b/src/SALOMEDS/CMakeLists.txt @@ -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 diff --git a/src/SALOMEDS/SALOMEDS_Study_i.cxx b/src/SALOMEDS/SALOMEDS_Study_i.cxx index 5bbc01b31..5e853fdcd 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.cxx @@ -25,6 +25,7 @@ // Module : SALOME // #include "utilities.h" +#include #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 @@ -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(); }