From 40a8f1be4ac48168c47791514e569a345717e429 Mon Sep 17 00:00:00 2001 From: akl Date: Wed, 24 Sep 2014 17:03:19 +0400 Subject: [PATCH] Move the block of signals in common function to cover application exit also. --- src/SalomeApp/SalomeApp_Application.cxx | 3 --- src/SalomeApp/SalomeApp_Study.cxx | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) 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() ) -- 2.39.2