Salome HOME
Provide 'Exit' dialog box on 'File'->'Exit'
authorjfa <jfa@opencascade.com>
Fri, 7 Oct 2005 10:21:33 +0000 (10:21 +0000)
committerjfa <jfa@opencascade.com>
Fri, 7 Oct 2005 10:21:33 +0000 (10:21 +0000)
src/STD/STD_Application.cxx

index b05ee07619d1b1c904c55591a7fa29ce257afb0b..41e78afb0013bc8d2dd0ccd8c0d1fefa6406aa02 100755 (executable)
@@ -459,7 +459,10 @@ bool STD_Application::onSaveAsDoc()
 /*!Closing session.*/
 void STD_Application::onExit()
 {
-  SUIT_Session::session()->closeSession();
+  int aAnswer = SUIT_MessageBox::info2(desktop(), tr("INF_DESK_EXIT"), tr("QUE_DESK_EXIT"),
+                                       tr ("BUT_OK"), tr ("BUT_CANCEL"), 1, 2, 2);
+  if (aAnswer == 1)
+    SUIT_Session::session()->closeSession();
 }
 
 /*!Virtual slot. Not implemented here.*/