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-12-23 13:59:09 (GMT)
committer Walter Bender <walter.bender@gmail.com>2012-12-23 13:59:09 (GMT)
commit8696c519f32f060b4fd6f1a5a20827cd033650a0 (patch)
treebb4e99b166cc7680fac035550d1dbf5a7f97872c
parent16a3475efeb3f4956620f8eb07136f8e9bf3a67c (diff)
disable hover help when running
-rw-r--r--TurtleArt/talogo.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/TurtleArt/talogo.py b/TurtleArt/talogo.py
index d32b254..2fd4904 100644
--- a/TurtleArt/talogo.py
+++ b/TurtleArt/talogo.py
@@ -147,6 +147,7 @@ class LogoCode:
self.pixbuf = None
self.dsobject = None
self.start_time = None
+ self._disable_help = False
self.body_height = int((self.tw.canvas.height / 40) * self.tw.scale)
@@ -164,6 +165,10 @@ class LogoCode:
stop_media(self)
self.tw.active_turtle.show()
self.tw.running_blocks = False
+ # If we disabled hover help, reenable it
+ if self._disable_help:
+ self.tw.no_help = False
+ self._disable_help = False
def def_prim(self, name, args, fcn, rprim=False):
""" Define the primitives associated with the blocks """
@@ -195,6 +200,10 @@ class LogoCode:
self.update_values = True
else:
self.update_values = False
+ # Disabled hover help while program is running
+ if not self.tw.no_help:
+ self._disable_help = True
+ self.tw.no_help = True
for b in blocks:
b.unhighlight()
@@ -376,6 +385,10 @@ class LogoCode:
self.tw.toolbar_shapes['stopiton'].hide()
yield False
self.running = False
+ # If we disabled hover help, reenable it
+ if self._disable_help:
+ self.tw.no_help = False
+ self._disable_help = False
def icall(self, fcn, *args):
""" Add a function and its arguments to the program stack. """