diff options
author | Walter Bender <walter@sugarlabs.org> | 2010-09-20 00:31:59 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2010-09-20 00:31:59 (GMT) |
commit | e3293e79d86ff5bd9fee6c49142c371c8e34c1f3 (patch) | |
tree | d0126debf123b1686d79ef1c8ee00fb0b692802a /TurtleArt | |
parent | 920ad48dbea89b4801259aac10e58efd9692038c (diff) |
fixed logic error when auto-shrinking blocks; added grow_arm to auto-scale on dock
Diffstat (limited to 'TurtleArt')
-rw-r--r-- | TurtleArt/tawindow.py | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py index 98b8e16..5649cbe 100644 --- a/TurtleArt/tawindow.py +++ b/TurtleArt/tawindow.py @@ -1570,26 +1570,23 @@ class TurtleArtWindow(): if best_you.name not in BOOLEAN_STYLE and \ best_you.name in EXPANDABLE_BLOCKS and best_your_dockn == 1: + dy = 0 if my_block.name in EXPANDABLE_BLOCKS: dy = 20 + my_block.ey - best_you.ey - if dy != 0: - best_you.expand_in_y(dy) - group = find_group(my_block) - group.append(best_you) - for gblk in find_group(best_you): - if gblk not in group: - gblk.spr.move_relative((0, dy * best_you.scale)) - if best_you.name in COMPARE_STYLE: - for gblk in find_group(best_you): - gblk.spr.move_relative((0, - -dy * best_you.scale)) + best_you.expand_in_y(dy) else: if best_you.ey > 0: dy = best_you.reset_y() - if best_you.name in COMPARE_STYLE: - for gblk in find_group(best_you): - gblk.spr.move_relative((0, - -dy * best_you.scale)) + if dy != 0: + group = find_group(my_block) + group.append(best_you) + for gblk in find_group(best_you): + if gblk not in group: + gblk.spr.move_relative((0, dy * best_you.scale)) + if best_you.name in COMPARE_STYLE: + for gblk in find_group(best_you): + gblk.spr.move_relative((0, -dy * best_you.scale)) + grow_stack_arm(find_sandwich_top(best_you)) def _import_from_journal(self, blk): """ Import a file from the Sugar Journal """ |