From b5ffa3a7e62ce8c3df80144c90c81d272c050c53 Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 7 Jun 2019 13:03:46 +0200 Subject: Minor fixes for DB field autocomplete + proper init of autocomplete dictionary for swiss fields --- jfr_playoff/gui/frames/match.py | 2 +- jfr_playoff/gui/frames/team.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'jfr_playoff') diff --git a/jfr_playoff/gui/frames/match.py b/jfr_playoff/gui/frames/match.py index 6f1ed26..f393585 100644 --- a/jfr_playoff/gui/frames/match.py +++ b/jfr_playoff/gui/frames/match.py @@ -123,7 +123,7 @@ class SwissSettingsFrame(RepeatableFrame): (ttk.Separator(self, orient=tk.HORIZONTAL)).grid( row=9, column=0, columnspan=6, sticky=tk.E+tk.W) - self.fetchDBField.setOptions([]) + self._onDBListChange() self._setFields() self._setPositionInfo() diff --git a/jfr_playoff/gui/frames/team.py b/jfr_playoff/gui/frames/team.py index f1ce7d1..ada8f24 100644 --- a/jfr_playoff/gui/frames/team.py +++ b/jfr_playoff/gui/frames/team.py @@ -163,8 +163,8 @@ class DBSelectionField(ttk.Entry): self.insert(0, new_suggestion) self.selection_range(len(prefix), tk.END) return 'break' - except tk.TclError: - # no text selection + except (tk.TclError, ValueError): + # no text selection or selection was altered, ignore pass def _onChange(self, event): -- cgit v1.2.3