Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/tawindow.py
diff options
context:
space:
mode:
Diffstat (limited to 'TurtleArt/tawindow.py')
-rw-r--r--TurtleArt/tawindow.py24
1 files changed, 6 insertions, 18 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py
index e1de162..77459e5 100644
--- a/TurtleArt/tawindow.py
+++ b/TurtleArt/tawindow.py
@@ -1308,12 +1308,7 @@ class TurtleArtWindow():
self.trash_stack = []
def _in_the_trash(self, x, y):
- """ Is x, y over the trash can? """
- """
- if self.selected_palette == palette_names.index('trash') and \
- self.palette_sprs[palette_names.index('trash')][self.orientation].hit((x, y)):
- return True
- """
+ """ Is x, y over a palette? """
if self.selected_palette is not None and \
self.palette_sprs[self.selected_palette][self.orientation].hit(
(x, y)):
@@ -1791,7 +1786,7 @@ class TurtleArtWindow():
return
blk = self.drag_group[0]
- # Remove blocks by dragging them onto the trash palette.
+ # Remove blocks by dragging them onto any palette.
if self.block_operation == 'move' and self._in_the_trash(x, y):
self._put_in_trash(blk, x, y)
self.drag_group = None
@@ -2028,7 +2023,8 @@ class TurtleArtWindow():
for gblk in find_group(blk):
if gblk not in group:
gblk.spr.move_relative((0, dy * blk.scale))
- if blk.name in block_styles['compare-style']:
+ if blk.name in block_styles['compare-style'] or \
+ blk.name in block_styles['compare-porch-style']:
for gblk in find_group(blk):
gblk.spr.move_relative((0, -dy * blk.scale))
@@ -2065,7 +2061,8 @@ class TurtleArtWindow():
for gblk in find_group(blk):
if gblk not in group:
gblk.spr.move_relative((0, dy * blk.scale))
- if blk.name in block_styles['compare-style']:
+ if blk.name in block_styles['compare-style'] or \
+ blk.name in block_styles['compare-porch-style']:
for gblk in find_group(blk):
gblk.spr.move_relative((0, -dy * blk.scale))
else:
@@ -2194,12 +2191,6 @@ class TurtleArtWindow():
else:
dy = 20 + selected_block.ey - best_destination.ey
best_destination.expand_in_y(dy)
- if best_destination.name in block_styles[
- 'compare-porch-style']:
- offset = -dy * best_destination.scale
- best_destination.spr.move_relative((0, offset))
- for blk in self.drag_group:
- blk.spr.move_relative((0, offset))
else:
if best_destination.ey > 0:
dy = best_destination.reset_y()
@@ -2232,9 +2223,6 @@ class TurtleArtWindow():
dy = blk2.reset_y()
if dy != 0:
self._expand_expandable(blk2, blk, dy)
- if blk2.name in block_styles[
- 'compare-porch-style']:
- blk2.spr.move_relative((0, -dy * blk2.scale))
self._cascade_expandable(blk2)
grow_stack_arm(find_sandwich_top(blk2))