From 86845dc91f612d5d32535b8e355af5448c3e1ec3 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Sun, 06 Oct 2013 23:30:45 +0000 Subject: fix bug in collaboration: don't share during show --- diff --git a/TurtleArt/tacollaboration.py b/TurtleArt/tacollaboration.py index 26a21d7..4f4406b 100644 --- a/TurtleArt/tacollaboration.py +++ b/TurtleArt/tacollaboration.py @@ -75,7 +75,7 @@ class Collaboration(): 'f': self._move_forward, 'a': self._move_in_arc, 'r': self._rotate_turtle, - 'x': self._setxy, + 'x': self._set_xy, 'W': self._draw_text, 'c': self._set_pen_color, 'g': self._set_pen_gray_level, @@ -347,12 +347,12 @@ class Collaboration(): self._tw.turtles.set_turtle(nick) self._tw.turtles.get_active_turtle().set_heading(h, False) - def _setxy(self, payload): + def _set_xy(self, payload): if len(payload) > 0: [nick, [x, y]] = data_from_string(payload) if nick != self._tw.nick: self._tw.turtles.set_turtle(nick) - self._tw.turtles.get_active_turtle().set_xy(x, y, False) + self._tw.turtles.get_active_turtle().set_xy(x, y, share=False) def _draw_text(self, payload): if len(payload) > 0: diff --git a/TurtleArt/taturtle.py b/TurtleArt/taturtle.py index e958f94..5e24ce7 100644 --- a/TurtleArt/taturtle.py +++ b/TurtleArt/taturtle.py @@ -157,7 +157,7 @@ class Turtles: # if it is a new turtle, start it in the center of the screen self._active_turtle = self.get_turtle(turtle_name, True, colors) self._active_turtle.set_heading(0.0, False) - self._active_turtle.set_xy(0.0, 0.0, False, pendown=False) + self._active_turtle.set_xy(0.0, 0.0, share=False, pendown=False) self._active_turtle.set_pen_state(True) elif colors is not None: self._active_turtle = self.get_turtle(turtle_name, False) @@ -493,7 +493,7 @@ class Turtle: self.spr.set_layer(TURTLE_LAYER) self._hidden = False self.move_turtle_spr((self._x, self._y)) - self.set_heading(self._heading) + self.set_heading(self._heading, share=False) if self.label_block is not None: self.label_block.spr.set_layer(TURTLE_LAYER + 1) diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py index 7209dd3..af611a3 100644 --- a/TurtleArt/tawindow.py +++ b/TurtleArt/tawindow.py @@ -1458,7 +1458,7 @@ class TurtleArtWindow(): self.toolbar_shapes['stopiton'].set_layer(TAB_LAYER) self.showlabel('status', label=_('Please hit the Stop Button \ -before making changes to your Turtle Blocks program')) +before making changes to your program')) self._autohide_shape = True return True @@ -3901,7 +3901,8 @@ before making changes to your Turtle Blocks program')) ''' Restore a turtle from its saved state ''' tid, name, xcor, ycor, heading, color, shade, pensize = blk self.turtles.set_turtle(key) - self.turtles.get_active_turtle().set_xy(xcor, ycor, pendown=False) + self.turtles.get_active_turtle().set_xy(xcor, ycor, share=True, + pendown=False) self.turtles.get_active_turtle().set_heading(heading) self.turtles.get_active_turtle().set_color(color) self.turtles.get_active_turtle().set_shade(shade) -- cgit v0.9.1