Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-09-20 00:52:44 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-09-20 00:52:44 (GMT)
commit1af4778a1f38242c311b2683fab2c9c43fe7fb97 (patch)
tree07552a9df5aaf341aa4f14744a30fe70b5c20504 /TurtleArt
parente3293e79d86ff5bd9fee6c49142c371c8e34c1f3 (diff)
fixed logic for autoscaling booleans
Diffstat (limited to 'TurtleArt')
-rw-r--r--TurtleArt/tawindow.py23
1 files changed, 23 insertions, 0 deletions
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: