]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Move the block of signals in common function to cover application exit also.
authorakl <alexander.kovalev@opencascade.com>
Wed, 24 Sep 2014 13:03:19 +0000 (17:03 +0400)
committerakl <alexander.kovalev@opencascade.com>
Wed, 24 Sep 2014 13:03:19 +0000 (17:03 +0400)
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/SalomeApp_Study.cxx

index 62ebe07bbc3e672122a4896ba4d3f6077e7e137a..34ca54087d2ac66e03d973fbbe3f099e3f13e427 100644 (file)
@@ -678,10 +678,7 @@ void SalomeApp_Application::onCloseDoc( bool ask )
 
     }
   }
-  bool isBlocked = desktop()->signalsBlocked();
-  desktop()->blockSignals( true );
   LightApp_Application::onCloseDoc( ask );
-  desktop()->blockSignals( isBlocked );
 }
 
 /*!Sets enable or disable some actions on selection changed.*/
index b83431fa04af01890d8600ab013da2b84b95a623..2934889368ae8446a0f7c327f85641c628322024 100644 (file)
@@ -734,7 +734,11 @@ void SalomeApp_Study::closeDocument(bool permanently)
     if ( myObserver )
       myStudyDS->detach( myObserver->_this() );
     if ( permanently ) {
+      SUIT_Desktop* desk = SUIT_Session::session()->activeApplication()->desktop();
+      bool isBlocked = desk->signalsBlocked();
+      desk->blockSignals( true );
       SalomeApp_Application::studyMgr()->Close( studyPtr );
+      desk->blockSignals( isBlocked );
 #ifndef DISABLE_PYCONSOLE
       SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>( application() );
       if( app->pythonConsole() )