From 1ba50389bff517512e417500f4c52ceeafdb06a5 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Mon, 13 Jun 2011 00:40:31 +0200 Subject: host/simu: randomize team color --- host/simu/view/switch.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'host/simu/view/switch.py') 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 () -- cgit v1.2.3