]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Slot for signal from KERNEL that study was closed.
authorakl <alexander.kovalev@opencascade.com>
Tue, 23 Sep 2014 10:10:19 +0000 (14:10 +0400)
committerakl <alexander.kovalev@opencascade.com>
Tue, 23 Sep 2014 10:10:19 +0000 (14:10 +0400)
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/SalomeApp_Application.h

index 18ec97033c91019a014505af320a2404f1dc48ee..f10ac29ac15b26c06197c214b43146a3fa27738a 100644 (file)
@@ -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 );
   }
 }
 
index 90655a4b37e4f79efe8dce3f5d5d3aff57693250..8e0847d4cb6bacc31f61664f3377de3d323b16b2 100644 (file)
@@ -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();