Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-08-19 02:08:41 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-08-19 02:08:41 (GMT)
commit1e53865375e94229b31d894ffc5c6da8047901b6 (patch)
tree8c1122ca3999ab204e3fa889d75dd2f2c3655501
parent27dd7f869a1da32d029df7427b0a549fa46e2dc4 (diff)
more speed optimizations for drag stack
-rw-r--r--TurtleArt/tawindow.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py
index 160334b..d99672f 100644
--- a/TurtleArt/tawindow.py
+++ b/TurtleArt/tawindow.py
@@ -1184,12 +1184,13 @@ class TurtleArtWindow():
"""
for blk in self.drag_group:
(bx, by) = blk.spr.get_xy()
- blk.spr.move((bx + dx, by + dy), blk.status)
+ blk.spr.move((bx + dx, by + dy), blk.status=='collapsed')
"""
- maxx = -1
- maxy = -1
- minx = 10000
- miny = 10000
+ maxx = blk.spr.rect.x
+ maxy = blk.spr.rect.x + blk.spr.rect.width
+ minx = blk.spr.rect.y
+ miny = blk.spr.rect.y + blk.spr.rect.height
+
for blk in self.drag_group:
if blk.spr.rect.x < minx:
minx = blk.spr.rect.x