From ae8054b5275325ee924372205bbb8ef92677e3a0 Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Sat, 18 Jan 2014 14:32:12 +0000 Subject: fix issue with canvas dragging during execution --- diff --git a/NEWS b/NEWS index 09730a7..71d88a1 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +197 + +BUG FIX: +* Fix problem with dragging canvas while programming is running + 196 ENHANCEMENTS: diff --git a/TurtleArt/talogo.py b/TurtleArt/talogo.py index ec6e7e7..7307b99 100644 --- a/TurtleArt/talogo.py +++ b/TurtleArt/talogo.py @@ -554,6 +554,7 @@ class LogoCode: while (_millisecond() - starttime) < 120: try: if self.step is None: + self.tw.running_blocks = False return False if self.tw.running_turtleart: try: @@ -588,12 +589,14 @@ class LogoCode: except BaseException as error: if isinstance(error, (StopIteration, logoerror)): + self.tw.running_blocks = False raise error else: traceback.print_exc() self.tw.showlabel( 'status', '%s: %s' % (type(error).__name__, str(error))) + self.tw.running_blocks = False return False except StopIteration: if self.tw.running_turtleart: @@ -613,10 +616,10 @@ class LogoCode: self.tw.display_coordinates() self.tw.showlabel('syntaxerror', str(e)) self.tw.turtles.show_all() - self.tw.running_blocks = False else: traceback.print_exc() self.tw.showlabel('status', 'logoerror: ' + str(e)) + self.tw.running_blocks = False return False return True diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py index db24d08..09b9b30 100644 --- a/TurtleArt/tawindow.py +++ b/TurtleArt/tawindow.py @@ -359,6 +359,7 @@ class TurtleArtWindow(): font_map_default.set_resolution(dpi) def _tablet_mode(self): + ''' DEPRECATED ''' return False # Sugar will autoscroll the window for me def _get_plugin_home(self): @@ -3278,7 +3279,7 @@ before making changes to your program')) else: while self.lc.doevalstep(): pass - self.running_blocks = False + # self.running_blocks = False # Should be handled in talogo.py def _snap_to_dock(self): ''' Snap a block (selected_block) to the dock of another block diff --git a/activity/activity.info b/activity/activity.info index d418528..316bd6e 100644 --- a/activity/activity.info +++ b/activity/activity.info @@ -1,6 +1,6 @@ [Activity] name = TurtleBlocks -activity_version = 196 +activity_version = 197 license = MIT bundle_id = org.laptop.TurtleArtActivity exec = sugar-activity TurtleArtActivity.TurtleArtActivity -- cgit v0.9.1