From e932dc7e2e45cdd56f7ef5148335f758dbb26a7b Mon Sep 17 00:00:00 2001 From: emkael Date: Sun, 23 Jun 2019 12:40:00 +0200 Subject: Refreshing match list dropdowns on match list change --- jfr_playoff/gui/frames/match.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'jfr_playoff/gui/frames/match.py') diff --git a/jfr_playoff/gui/frames/match.py b/jfr_playoff/gui/frames/match.py index 6772e6b..ceaeec2 100644 --- a/jfr_playoff/gui/frames/match.py +++ b/jfr_playoff/gui/frames/match.py @@ -163,7 +163,7 @@ class MatchSelectionFrame(SelectionFrame): (ttk.Label(container, text='[%d]' % (idx+1))).grid( row=idx+1, column=0) (ttk.Checkbutton( - container, text='Mecz nr %d' % (option.getMatchID()), + container, text=option.label, variable=self.values[idx] )).grid(row=idx+1, column=1, sticky=tk.W) @@ -360,6 +360,8 @@ class MatchSettingsFrame(RepeatableFrame): self.source.set(self.SCORE_SOURCE_CUSTOM) + self.winfo_toplevel().event_generate( + '<>', when='tail') @classmethod def info(cls): @@ -368,6 +370,10 @@ class MatchSettingsFrame(RepeatableFrame): def getMatchID(self): return self.matchID + @property + def label(self): + return 'Mecz nr %d' % (self.getMatchID()) + class MatchSeparator(RepeatableFrame): def renderContent(self): (ttk.Separator(self, orient=tk.HORIZONTAL)).pack( -- cgit v1.2.3