summaryrefslogtreecommitdiff
path: root/host/simu/view/switch.py
diff options
context:
space:
mode:
authorNicolas Schodet2011-06-13 00:40:31 +0200
committerNicolas Schodet2011-06-13 00:40:31 +0200
commit1ba50389bff517512e417500f4c52ceeafdb06a5 (patch)
tree59418d78032e48dc1a10ecba8ef1ec71971d36e2 /host/simu/view/switch.py
parent90a89850cbc3e4540543784813a71a7b2ac97dfc (diff)
host/simu: randomize team color
Diffstat (limited to 'host/simu/view/switch.py')
-rw-r--r--host/simu/view/switch.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/host/simu/view/switch.py b/host/simu/view/switch.py
index c0ec2d58..445cbd02 100644
--- a/host/simu/view/switch.py
+++ b/host/simu/view/switch.py
@@ -28,6 +28,8 @@ class Switch:
def __init__ (self, frame, model, text):
self.var = IntVar ()
+ if model.state is not None:
+ self.var.set ((0, 1)[model.state])
self.button = Checkbutton (frame, variable = self.var,
command = self.__update, text = text, indicatoron = False)
self.button.pack ()