summaryrefslogtreecommitdiff
path: root/jfr_playoff/gui/frames/match.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-06-27 23:45:45 +0200
committeremkael <emkael@tlen.pl>2019-06-27 23:45:45 +0200
commite53d7c6e35e8bb7aab42976f470957dde313ece5 (patch)
tree0778321536ccfe0f9b546341ff3b04d7e3ca58e7 /jfr_playoff/gui/frames/match.py
parent512a48d2d4f556b30f502c4c057a975f43f58764 (diff)
Generating MatchListChanged events on repeater add/remove
Diffstat (limited to 'jfr_playoff/gui/frames/match.py')
-rw-r--r--jfr_playoff/gui/frames/match.py7
1 files changed, 7 insertions, 0 deletions
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']