Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2011-03-17 19:18:12 (GMT)
committer Walter Bender <walter.bender@gmail.com>2011-03-17 19:18:12 (GMT)
commitc66c065ec761e167e68a63e2860c382f745b2eea (patch)
treedd39acc95d4761b6d787652df4f75f87a392dc30 /TurtleArt
parentfe5a5552ebb1a2d1fb7930b31c631e23332b108b (diff)
don't add joiner to the remote turtle list when they rejoin to avoid duplicate labels
Diffstat (limited to 'TurtleArt')
-rw-r--r--TurtleArt/tacollaboration.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/TurtleArt/tacollaboration.py b/TurtleArt/tacollaboration.py
index 6f7cf8f..e1534a4 100644
--- a/TurtleArt/tacollaboration.py
+++ b/TurtleArt/tacollaboration.py
@@ -213,12 +213,17 @@ class Collaboration():
if nick != self._tw.nick: # It is not me.
# There may not be a turtle dictionary.
if hasattr(self._tw, 'remote_turtle_dictionary'):
+ # Make sure it is not a "rejoin".
+ if not nick in self._tw.remote_turtle_dictionary:
+ # Add new turtle for the joiner.
+ self._tw.canvas.set_turtle(nick, colors)
+ self._tw.label_remote_turtle(nick, colors)
self._tw.remote_turtle_dictionary[nick] = colors
else:
self._tw.remote_turtle_dictionary = self._get_dictionary()
- # Add new turtle for the joiner.
- self._tw.canvas.set_turtle(nick, colors)
- self._tw.label_remote_turtle(nick, colors)
+ # Add new turtle for the joiner.
+ self._tw.canvas.set_turtle(nick, colors)
+ self._tw.label_remote_turtle(nick, colors)
# Sharer should send the updated remote turtle dictionary to everyone.
if self.initiating: