summaryrefslogtreecommitdiff
path: root/jfr_playoff/gui/frames/match.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-06-23 12:40:00 +0200
committeremkael <emkael@tlen.pl>2019-06-23 12:40:00 +0200
commite932dc7e2e45cdd56f7ef5148335f758dbb26a7b (patch)
tree52ebc2101861e0571b42f9a360337ed5866730c4 /jfr_playoff/gui/frames/match.py
parentb8d98eb0e0f9fa7e695539164d61f90a271478d2 (diff)
Refreshing match list dropdowns on match list change
Diffstat (limited to 'jfr_playoff/gui/frames/match.py')
-rw-r--r--jfr_playoff/gui/frames/match.py8
1 files changed, 7 insertions, 1 deletions
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(
+ '<<MatchListChanged>>', 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(