From a55ec7dffac6c69c99e7680855d4bf3a9a7ecf84 Mon Sep 17 00:00:00 2001 From: Victor Boudara Date: Fri, 4 May 2018 13:04:01 +0100 Subject: [PATCH] disable "do you want to save dialog" --- RepTate/gui/QApplicationManager.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/RepTate/gui/QApplicationManager.py b/RepTate/gui/QApplicationManager.py index 91094bf7..fcb67108 100644 --- a/RepTate/gui/QApplicationManager.py +++ b/RepTate/gui/QApplicationManager.py @@ -360,19 +360,20 @@ def handle_app_coming_soon(self, appname=''): def closeEvent(self, event): - """Ask if we want to save project before closing RepTate""" - btns = (QMessageBox.Yes | QMessageBox.No | QMessageBox.Cancel) - msg = 'Do you want to save your project before exiting RepTate?' - title = 'Quit' - ans = QMessageBox.question(self, title , msg, buttons=btns) - if ans == QMessageBox.No: - event.accept() - elif ans == QMessageBox.Yes: - success = self.launch_save_dialog() - if not success: - event.ignore() - elif ans == QMessageBox.Cancel: - event.ignore() + """Ask if we want to save project before closing RepTate (uncomment the rest)""" + pass + # btns = (QMessageBox.Yes | QMessageBox.No | QMessageBox.Cancel) + # msg = 'Do you want to save your project before exiting RepTate?' + # title = 'Quit' + # ans = QMessageBox.question(self, title , msg, buttons=btns) + # if ans == QMessageBox.No: + # event.accept() + # elif ans == QMessageBox.Yes: + # success = self.launch_save_dialog() + # if not success: + # event.ignore() + # elif ans == QMessageBox.Cancel: + # event.ignore() def launch_open_dialog(self): """Get filename of RepTate project to open"""