diff options
author | Alan Aguiar <alanjas@hotmail.com> | 2014-03-30 21:12:22 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2014-03-30 21:12:22 (GMT) |
commit | bdc894ac34d947a80dbc473cbb5519a68a8f6a3b (patch) | |
tree | aab667fc40b9600ffbfab79f4a1f871a755bcaa9 /TurtleArt | |
parent | 6a44e294d951dde2ca0da66ee9f3a3b52c4fcb58 (diff) |
speed up no_help test
Diffstat (limited to 'TurtleArt')
-rw-r--r-- | TurtleArt/tawindow.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py index 1d87c9b..902b185 100644 --- a/TurtleArt/tawindow.py +++ b/TurtleArt/tawindow.py @@ -2470,6 +2470,8 @@ class TurtleArtWindow(): def _show_popup(self, x, y): ''' Let's help our users by displaying a little help. ''' + if self.no_help: + return spr = self.sprite_list.find_sprite((x, y)) blk = self.block_list.spr_to_block(spr) if spr and blk is not None: @@ -2507,8 +2509,6 @@ class TurtleArtWindow(): def _do_show_popup(self, block_name): ''' Fetch the help text and display it. ''' - if self.no_help: - return 0 if block_name in special_names: special_block_name = special_names[block_name] elif block_name in block_names: |