Skip to content

Commit

Permalink
[FIX] - No save on exit. Confirm exit with unsaved changes
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Jan 13, 2019
1 parent 3cd8015 commit 75c2b30
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/configmanager/ui/configmanagerdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@ def __init__(self, roamapp, parent=None):
ConfigEvents.deleteForm.connect(self.delete_form)

def closeEvent(self, closeevent):
self.save_page_config()
closeevent.accept()
result = QMessageBox.warning(self, "Close Config Manager", "Close Config Manager? Changes won't be saved ", QMessageBox.Ok | QMessageBox.Cancel)
if result == QMessageBox.Ok:
closeevent.accept()
else:
closeevent.ignore()

def raiseerror(self, *exinfo):
self.bar.pushError(*exinfo)
Expand Down

0 comments on commit 75c2b30

Please sign in to comment.