From c66c065ec761e167e68a63e2860c382f745b2eea Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Thu, 17 Mar 2011 19:18:12 +0000 Subject: don't add joiner to the remote turtle list when they rejoin to avoid duplicate labels --- (limited to 'TurtleArt') 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: -- cgit v0.9.1