From: akl Date: Wed, 24 Sep 2014 13:03:19 +0000 (+0400) Subject: Move the block of signals in common function to cover application exit also. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=40a8f1be4ac48168c47791514e569a345717e429;p=modules%2Fgui.git Move the block of signals in common function to cover application exit also. --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 62ebe07bb..34ca54087 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -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.*/ diff --git a/src/SalomeApp/SalomeApp_Study.cxx b/src/SalomeApp/SalomeApp_Study.cxx index b83431fa0..293488936 100644 --- a/src/SalomeApp/SalomeApp_Study.cxx +++ b/src/SalomeApp/SalomeApp_Study.cxx @@ -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( application() ); if( app->pythonConsole() )