From: akl Date: Tue, 23 Sep 2014 10:10:19 +0000 (+0400) Subject: Slot for signal from KERNEL that study was closed. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e701f8c371c97fda0bad059a197bdaf661ac8afe;p=modules%2Fgui.git Slot for signal from KERNEL that study was closed. --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 18ec97033..f10ac29ac 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -165,7 +165,7 @@ SalomeApp_Application::SalomeApp_Application() : LightApp_Application() { connect( desktop(), SIGNAL( message( const QString& ) ), - this, SLOT( onLoadDocMessage( const QString& ) ), Qt::UniqueConnection ); + this, SLOT( onParseMessage( const QString& ) ), Qt::UniqueConnection ); myIsSiman = false; // default } @@ -399,7 +399,7 @@ void SalomeApp_Application::setDesktop( SUIT_Desktop* desk ) if ( desk ) { connect( desk, SIGNAL( message( const QString& ) ), - this, SLOT( onLoadDocMessage( const QString& ) ), Qt::UniqueConnection ); + this, SLOT( onParseMessage( const QString& ) ), Qt::UniqueConnection ); } } @@ -573,7 +573,7 @@ bool SalomeApp_Application::onLoadDoc( const QString& aName ) } /*!SLOT. Load document with a name, specified in \a aMessage.*/ -void SalomeApp_Application::onLoadDocMessage(const QString& aMessage) +void SalomeApp_Application::onParseMessage(const QString& aMessage) { if (aMessage.indexOf("simanCheckoutDone ") == 0) { #ifdef WITH_SIMANIO @@ -583,6 +583,8 @@ void SalomeApp_Application::onLoadDocMessage(const QString& aMessage) printf( "* Warning: SALOME is built without SIMAN support.\n" ); printf( "****************************************************************\n" ); #endif + } else if (aMessage.indexOf("studyClosed:") == 0) { + onCloseDoc( false ); } } diff --git a/src/SalomeApp/SalomeApp_Application.h b/src/SalomeApp/SalomeApp_Application.h index 90655a4b3..8e0847d4c 100644 --- a/src/SalomeApp/SalomeApp_Application.h +++ b/src/SalomeApp/SalomeApp_Application.h @@ -127,7 +127,7 @@ public slots: virtual bool onLoadDoc( const QString& ); virtual void onUnloadDoc( bool ask = true); virtual void onCloseDoc( bool ask = true); - virtual void onLoadDocMessage(const QString&); + virtual void onParseMessage(const QString&); virtual void onExit(); virtual void onCopy();