summaryrefslogtreecommitdiff
path: root/host/simu/view/table_eurobot2011.py
diff options
context:
space:
mode:
Diffstat (limited to 'host/simu/view/table_eurobot2011.py')
-rw-r--r--host/simu/view/table_eurobot2011.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/host/simu/view/table_eurobot2011.py b/host/simu/view/table_eurobot2011.py
index 5725e5b8..b39f2834 100644
--- a/host/simu/view/table_eurobot2011.py
+++ b/host/simu/view/table_eurobot2011.py
@@ -76,8 +76,13 @@ class Table (Drawable):
def __init__ (self, onto, model):
Drawable.__init__ (self, onto)
self.model = model
- for e in model.pawns:
- Pawn (self, e)
+ self.model.register (self.__notified)
+ self.__notified ()
+
+ def __notified (self):
+ for e in self.model.pawns:
+ if e not in self.children:
+ Pawn (self, e)
def draw_both (self, primitive, *args, **kargs):
"""Draw a primitive on both sides."""