Skip to content

Commit

Permalink
disable "do you want to save dialog"
Browse files Browse the repository at this point in the history
  • Loading branch information
vbdr committed May 4, 2018
1 parent 456ee2a commit a55ec7d
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions RepTate/gui/QApplicationManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down

0 comments on commit a55ec7d

Please sign in to comment.