From 7354a92ecb7c69537c4e1904ec463a2b216be162 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 27 Jun 2019 14:07:39 +0200 Subject: Storing filepath in main window --- jfr_playoff/gui/__init__.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'jfr_playoff/gui/__init__.py') diff --git a/jfr_playoff/gui/__init__.py b/jfr_playoff/gui/__init__.py index 02ef3bb..2a890d1 100644 --- a/jfr_playoff/gui/__init__.py +++ b/jfr_playoff/gui/__init__.py @@ -16,6 +16,7 @@ class PlayoffGUI(tk.Tk): self._title = tk.StringVar() self._title.trace('w', self._setTitle) self._dirty = False + self._filepath = None def run(self): self.notebook = ttk.Notebook(self) @@ -37,6 +38,7 @@ class PlayoffGUI(tk.Tk): self._setValues({}) def newFile(self): + self._filepath = None self.newFileIndex += 1 self._title.set('Nowa drabinka %d' % (self.newFileIndex)) self._resetValues() @@ -49,6 +51,7 @@ class PlayoffGUI(tk.Tk): )) def openFile(self, filepath): + self._filepath = filepath self._title.set(os.path.basename(filepath)) self._setValues(json.load(open(filepath))) -- cgit v1.2.3