diff options
author | emkael <emkael@tlen.pl> | 2019-06-02 23:41:51 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2019-06-02 23:41:51 +0200 |
commit | fe24609295876943391e572d3ec7a48f3f962e75 (patch) | |
tree | 32023f9a1af17ab0ff434f01f6f352d99445b330 /jfr_playoff | |
parent | 44fabb59a4f7ddaa342dd14ed8be65d0fc8bf4cd (diff) |
Setting team list correctly for team selection dialog
Diffstat (limited to 'jfr_playoff')
-rw-r--r-- | jfr_playoff/gui/frames/team.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/jfr_playoff/gui/frames/team.py b/jfr_playoff/gui/frames/team.py index fac3fa6..78b2be0 100644 --- a/jfr_playoff/gui/frames/team.py +++ b/jfr_playoff/gui/frames/team.py @@ -110,7 +110,8 @@ class TeamFetchSettingsFrame(tk.Frame): self._changeNotify(None) def _chooseFinishingPositions(self): - if not self.master.teams: + teams = self.winfo_toplevel().getTeams() + if not len(teams): tkMessageBox.showerror( 'Wybór teamów', 'W turnieju nie ma teamów do wyboru') self._setFinishingPositions([]) @@ -120,7 +121,7 @@ class TeamFetchSettingsFrame(tk.Frame): selectionFrame = TeamSelectionFrame( dialog, title='Wybierz teamy, które zakończyły rozgrywki ' + \ 'na swojej pozycji:', - teams=self.master.teams, + teams=teams, selected=lambda idx, team: idx+1 in self.finishingPositions, callback=self._setFinishingPositions, vertical=True) selectionFrame.pack(fill=tk.BOTH, expand=True, padx=5, pady=5) |