From 1af4778a1f38242c311b2683fab2c9c43fe7fb97 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Mon, 20 Sep 2010 00:52:44 +0000 Subject: fixed logic for autoscaling booleans --- (limited to 'TurtleArt/tawindow.py') diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py index 5649cbe..cfc6fac 100644 --- a/TurtleArt/tawindow.py +++ b/TurtleArt/tawindow.py @@ -1588,6 +1588,29 @@ class TurtleArtWindow(): gblk.spr.move_relative((0, -dy * best_you.scale)) grow_stack_arm(find_sandwich_top(best_you)) + if best_you.name in BOOLEAN_STYLE and best_your_dockn == 2: + dy = 0 + if my_block.name in EXPANDABLE_BLOCKS and my_block.ey > 0: + dy = my_block.ey - best_you.ey + best_you.expand_in_y(dy) + else: + if best_you.ey > 0: + dy = best_you.reset_y() + if dy != 0: + if best_you.connections[1] is not None: + group = find_group(best_you.connections[1]) + group.append(best_you) + else: + group = [best_you] + + for gblk in find_group(best_you): + if gblk not in group: + gblk.spr.move_relative((0, dy * best_you.scale)) + 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 """ if self.running_sugar: -- cgit v0.9.1