From 4f3f27bd857e0de639d70c81150e8cbb1c2541b1 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Wed, 07 Nov 2012 20:04:06 +0000 Subject: don't clear start button when putting project into trash --- diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py index 18c0324..e0a9106 100644 --- a/TurtleArt/tawindow.py +++ b/TurtleArt/tawindow.py @@ -1328,7 +1328,14 @@ class TurtleArtWindow(): elif blk.name == 'trashall': for b in self.just_blocks(): if b.type != 'trash': - self._put_in_trash(find_top_block(b)) + if b.name == 'start': # Don't trash start block + b1 = b.connections[-1] + if b1 is not None: + b.connections[-1] = None + b1.connections[0] = None + self._put_in_trash(b1) + else: + self._put_in_trash(find_top_block(b)) elif blk.name in MACROS: self.new_macro(blk.name, x + 20, y + 20) else: -- cgit v0.9.1