summaryrefslogtreecommitdiffhomepage
path: root/host/simu/view/switch.py
diff options
context:
space:
mode:
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 ()