summaryrefslogtreecommitdiff
path: root/jfr_playoff/gui/frames/__init__.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-06-27 13:02:38 +0200
committeremkael <emkael@tlen.pl>2019-06-27 13:02:38 +0200
commit06dbe4b0a0021ab6e96324dfd729f7b4b9c60101 (patch)
tree080ca935a7666c1644711906f8ddbba1a782f94d /jfr_playoff/gui/frames/__init__.py
parent9d0176306e53934d3f6d1a2082ee82711d16d725 (diff)
Reusable setValue for WidgetRepeater
Diffstat (limited to 'jfr_playoff/gui/frames/__init__.py')
-rw-r--r--jfr_playoff/gui/frames/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/jfr_playoff/gui/frames/__init__.py b/jfr_playoff/gui/frames/__init__.py
index 623b5bd..dba30a5 100644
--- a/jfr_playoff/gui/frames/__init__.py
+++ b/jfr_playoff/gui/frames/__init__.py
@@ -117,6 +117,8 @@ class WidgetRepeater(tk.Frame):
if i >= len(self.widgets):
self._addWidget()
self.widgets[i].setValue(value[i])
+ for idx in range(len(value), len(self.widgets)):
+ self._removeWidget(idx)
class GuiFrame(tk.Frame):
def __init__(self, *args, **kwargs):