diff options
author | R. David Murray <rdmurray@bitdance.com> | 2009-09-28 18:45:13 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2009-09-28 18:45:13 (GMT) |
commit | 066acbc8db9784f190e8017a2a8d03f0e38a8aa6 (patch) | |
tree | abdf949ac969cbeb002c125b0082d835e15d32bd /Lib/lib-tk | |
parent | dfb495937437c62793489250df9d9dd33ac0f5a5 (diff) | |
download | cpython-066acbc8db9784f190e8017a2a8d03f0e38a8aa6.zip cpython-066acbc8db9784f190e8017a2a8d03f0e38a8aa6.tar.gz cpython-066acbc8db9784f190e8017a2a8d03f0e38a8aa6.tar.bz2 |
Merged revisions 75115 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75115 | r.david.murray | 2009-09-28 14:29:28 -0400 (Mon, 28 Sep 2009) | 2 lines
Applying patches backported from 3.1, by Gregor Lingl.
........
Diffstat (limited to 'Lib/lib-tk')
-rw-r--r-- | Lib/lib-tk/turtle.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Lib/lib-tk/turtle.py b/Lib/lib-tk/turtle.py index a3dc852..625b31b 100644 --- a/Lib/lib-tk/turtle.py +++ b/Lib/lib-tk/turtle.py @@ -1,8 +1,8 @@ # # turtle.py: a Tkinter based turtle graphics module for Python -# Version 1.0b1 - 31. 5. 2008 +# Version 1.0.1 - 24. 9. 2009 # -# Copyright (C) 2006 - 2008 Gregor Lingl +# Copyright (C) 2006 - 2009 Gregor Lingl # email: glingl@aon.at # # This software is provided 'as-is', without any express or implied @@ -1244,9 +1244,12 @@ class TurtleScreen(TurtleScreenBase): def update(self): """Perform a TurtleScreen update. """ + tracing = self._tracing + self._tracing = True for t in self.turtles(): t._update_data() t._drawturtle() + self._tracing = tracing self._update() def window_width(self): @@ -1337,7 +1340,8 @@ class TurtleScreen(TurtleScreenBase): ### consequently drawing a hexagon """ if fun == None: - self._keys.remove(key) + if key in self._keys: + self._keys.remove(key) elif key not in self._keys: self._keys.append(key) self._onkey(fun, key) @@ -3574,8 +3578,8 @@ class _Screen(TurtleScreen): topbottom = _CFG["topbottom"] self._root.setupcanvas(width, height, canvwidth, canvheight) _Screen._canvas = self._root._getcanvas() + TurtleScreen.__init__(self, _Screen._canvas) self.setup(width, height, leftright, topbottom) - TurtleScreen.__init__(self, _Screen._canvas) def setup(self, width=_CFG["width"], height=_CFG["height"], startx=_CFG["leftright"], starty=_CFG["topbottom"]): @@ -3615,6 +3619,7 @@ class _Screen(TurtleScreen): if starty is None: starty = (sh - height) / 2 self._root.set_geometry(width, height, startx, starty) + self.update() def title(self, titlestring): """Set title of turtle-window |