From 0c2bb4763b68ae5aab7e522996e9469259afb950 Mon Sep 17 00:00:00 2001 From: Alan Jhonn Aguiar Schwyn Date: Tue, 01 Apr 2014 12:25:36 +0000 Subject: fix problem with help status button infinite loop --- (limited to 'turtleblocks.py') diff --git a/turtleblocks.py b/turtleblocks.py index 1a75b67..0cabd37 100755 --- a/turtleblocks.py +++ b/turtleblocks.py @@ -244,6 +244,7 @@ return %s(self)" % (p, P, P) if hasattr(self, 'client'): if self.client.get_int(self._HOVER_HELP) == 1: self.tw.no_help = True + self.hover.set_active(False) self._do_hover_help_off_cb() if not self.client.get_int(self._COORDINATE_SCALE) in [0, 1]: self.tw.coord_scale = 1 @@ -746,7 +747,7 @@ Would you like to save before quitting?')) def _do_toggle_hover_help_cb(self, button): ''' Toggle hover help on/off ''' - self.tw.no_help = not self.tw.no_help + self.tw.no_help = not(button.get_active()) if self.tw.no_help: self._do_hover_help_off_cb() else: @@ -754,7 +755,6 @@ Would you like to save before quitting?')) def _do_hover_help_on_cb(self): ''' Turn hover help on ''' - self.hover.set_active(True) if hasattr(self, 'client'): self.client.set_int(self._HOVER_HELP, 0) @@ -763,7 +763,6 @@ Would you like to save before quitting?')) self.tw.last_label = None if self.tw.status_spr is not None: self.tw.status_spr.hide() - self.hover.set_active(False) if hasattr(self, 'client'): self.client.set_int(self._HOVER_HELP, 1) -- cgit v0.9.1