Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/taturtle.py
diff options
context:
space:
mode:
authorMarion <marion.zepf@gmail.com>2013-08-27 12:51:05 (GMT)
committer Marion <marion.zepf@gmail.com>2013-08-27 12:51:05 (GMT)
commit75b09fa3329de3e2b9a856ba0263ce74d6b28f3f (patch)
treee66bb909cd613a1148e8ba67a17142df0ce4df32 /TurtleArt/taturtle.py
parentdbc9daecdc6894fe62c23a86aaa91a9513742c13 (diff)
change interface of Turtle.set_xy to set_xy(x, y, share, pendown)
- Used to be set_xy(pos, share, pendown) with pos = (x, y). - Some calls to set_xy were already assuming the new interface. - Also fix the 'bullet list' block from the 'presentations' palette. (Small, related bug.)
Diffstat (limited to 'TurtleArt/taturtle.py')
-rw-r--r--TurtleArt/taturtle.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/TurtleArt/taturtle.py b/TurtleArt/taturtle.py
index 12882db..10d0230 100644
--- a/TurtleArt/taturtle.py
+++ b/TurtleArt/taturtle.py
@@ -154,7 +154,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, False, pendown=False)
self._active_turtle.set_pen_state(True)
elif colors is not None:
self._active_turtle = self.get_turtle(turtle_name, False)
@@ -555,12 +555,12 @@ class Turtle:
int(distance)]))
self._turtles.turtle_window.send_event(event)
- def set_xy(self, pos, share=True, pendown=True):
+ def set_xy(self, x, y, share=True, pendown=True):
old = self.get_xy()
try:
- xcor = pos[0] * self._turtles.turtle_window.coord_scale
- ycor = pos[1] * self._turtles.turtle_window.coord_scale
+ xcor = x * self._turtles.turtle_window.coord_scale
+ ycor = y * self._turtles.turtle_window.coord_scale
except (TypeError, ValueError):
debug_output('bad value sent to %s' % (__name__),
self._turtles.turtle_window.running_sugar)