summaryrefslogtreecommitdiff
path: root/jfr_playoff
diff options
context:
space:
mode:
Diffstat (limited to 'jfr_playoff')
-rw-r--r--jfr_playoff/gui/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/jfr_playoff/gui/__init__.py b/jfr_playoff/gui/__init__.py
index 086b3ab..56ed1cb 100644
--- a/jfr_playoff/gui/__init__.py
+++ b/jfr_playoff/gui/__init__.py
@@ -39,6 +39,7 @@ class PlayoffGUI(tk.Tk):
self._dirty.trace('w', self._setMenuButtons)
self._runTimer = None
self._filepath = None
+ self.protocol('WM_DELETE_WINDOW', self.onClose)
def run(self):
self.notebook = ttk.Notebook(self)
@@ -160,6 +161,10 @@ class PlayoffGUI(tk.Tk):
filename = filename + '.jtpo'
self.saveFile(filename)
+ def onClose(self, *args):
+ self._checkSave()
+ self.destroy()
+
def _run(self, config, interactive=True):
self._interactive = interactive
try: