summaryrefslogtreecommitdiff
path: root/jfr_playoff/gui/frames
diff options
context:
space:
mode:
Diffstat (limited to 'jfr_playoff/gui/frames')
-rw-r--r--jfr_playoff/gui/frames/__init__.py3
-rw-r--r--jfr_playoff/gui/frames/match.py7
2 files changed, 8 insertions, 2 deletions
diff --git a/jfr_playoff/gui/frames/__init__.py b/jfr_playoff/gui/frames/__init__.py
index 270bbbd..0165c71 100644
--- a/jfr_playoff/gui/frames/__init__.py
+++ b/jfr_playoff/gui/frames/__init__.py
@@ -139,8 +139,7 @@ class WidgetRepeater(tk.Frame):
self.widgets[i].setValue(value[1] if typedWidget else value)
for idx in range(len(values), len(self.widgets)):
self._removeWidget(len(self.widgets)-1)
- self.winfo_toplevel().event_generate(
- '<<MatchListChanged>>', when='tail')
+
class GuiFrame(tk.Frame):
def __init__(self, *args, **kwargs):
diff --git a/jfr_playoff/gui/frames/match.py b/jfr_playoff/gui/frames/match.py
index 07942bd..a7d46b2 100644
--- a/jfr_playoff/gui/frames/match.py
+++ b/jfr_playoff/gui/frames/match.py
@@ -386,6 +386,11 @@ class MatchSettingsFrame(RepeatableFrame):
SCORE_SOURCE_LINK = 1
SCORE_SOURCE_CUSTOM = 2
+ def destroy(self, *args, **kwargs):
+ self.winfo_toplevel().event_generate(
+ '<<MatchListChanged>>', when='tail')
+ RepeatableFrame.destroy(self, *args, **kwargs)
+
def _enablePanels(self, *args):
for val, fields in self.scoreWidgets.iteritems():
for field in fields:
@@ -661,6 +666,8 @@ class MatchPhaseFrame(ScrollableFrame):
self.matches.setValue(objects)
self.link.set(values['link'] if 'link' in values else '')
self.name.set(values['title'] if 'title' in values else '')
+ self.winfo_toplevel().event_generate(
+ '<<MatchListChanged>>', when='tail')
__all__ = ['SwissesFrame', 'MatchPhaseFrame', 'MatchSettingsFrame']