Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2012-11-07 18:52:42 (GMT)
committer Walter Bender <walter.bender@gmail.com>2012-11-07 18:52:42 (GMT)
commitbbb2ecefdc7b154edb14ae6e0772f8e64d288c0f (patch)
treef10c90ee99dfffc27b881d42ebd4edfc9ecc8871
parent427ac9159cb145a35e6d2d0a79c7fbf42ff67559 (diff)
improved behavior of stop button
-rwxr-xr-xturtleblocks.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/turtleblocks.py b/turtleblocks.py
index 09a62a9..1b184ac 100755
--- a/turtleblocks.py
+++ b/turtleblocks.py
@@ -570,10 +570,12 @@ class TurtleMain():
def _do_stop_cb(self, widget):
''' Callback for stop button. '''
- self.tw.lc.trace = 0
+ if not self.tw.hide and not self.tw.running_blocks:
+ self.tw.hideblocks()
+ else:
+ self.tw.showblocks()
self.tw.stop_button()
self.tw.display_coordinates()
- return
def _do_copy_cb(self, button):
''' Callback for copy button. '''