From e3293e79d86ff5bd9fee6c49142c371c8e34c1f3 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Mon, 20 Sep 2010 00:31:59 +0000 Subject: fixed logic error when auto-shrinking blocks; added grow_arm to auto-scale on dock --- (limited to 'TurtleArt') 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 """ -- cgit v0.9.1