From: jfa Date: Mon, 10 Oct 2005 13:56:00 +0000 (+0000) Subject: Provide 'Exit' dialog box on last application closure by right-upper corner cross X-Git-Tag: BR-D5-38-2003_D2005-12-19~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=26df94ef27f057734004b5bb43e8056dfd0ee24a;p=modules%2Fgui.git Provide 'Exit' dialog box on last application closure by right-upper corner cross --- diff --git a/src/STD/STD_Application.cxx b/src/STD/STD_Application.cxx index 41e78afb0..ec64212c9 100755 --- a/src/STD/STD_Application.cxx +++ b/src/STD/STD_Application.cxx @@ -72,6 +72,11 @@ void STD_Application::start() /*!Event on closing desktop*/ void STD_Application::onDesktopClosing( SUIT_Desktop*, QCloseEvent* e ) { + if (SUIT_Session::session()->applications().count() < 2) { + onExit(); + return; + } + if ( !isPossibleToClose() ) { e->ignore();