summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/CallTipWindow.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2012-03-13 21:18:36 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2012-03-13 21:18:36 (GMT)
commitee381a0c36e8d67dd4203928be8b4b393f2d9dc8 (patch)
treeeab0af0b938ec5c0c4d29d9a4f70baeea1e8415d /Lib/idlelib/CallTipWindow.py
parentdf50cebbed06731512543de7fb96137ecb453ab2 (diff)
downloadcpython-ee381a0c36e8d67dd4203928be8b4b393f2d9dc8.zip
cpython-ee381a0c36e8d67dd4203928be8b4b393f2d9dc8.tar.gz
cpython-ee381a0c36e8d67dd4203928be8b4b393f2d9dc8.tar.bz2
Issue #5219: Prevent event handler cascade in IDLE.
Patch by Roger Serwy.
Diffstat (limited to 'Lib/idlelib/CallTipWindow.py')
-rw-r--r--Lib/idlelib/CallTipWindow.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/idlelib/CallTipWindow.py b/Lib/idlelib/CallTipWindow.py
index 27ed085..a2431f8 100644
--- a/Lib/idlelib/CallTipWindow.py
+++ b/Lib/idlelib/CallTipWindow.py
@@ -22,6 +22,7 @@ class CallTip:
self.parenline = self.parencol = None
self.lastline = None
self.hideid = self.checkhideid = None
+ self.checkhide_after_id = None
def position_window(self):
"""Check if needs to reposition the window, and if so - do it."""
@@ -102,7 +103,10 @@ class CallTip:
self.hidetip()
else:
self.position_window()
- self.widget.after(CHECKHIDE_TIME, self.checkhide_event)
+ if self.checkhide_after_id is not None:
+ self.widget.after_cancel(self.checkhide_after_id)
+ self.checkhide_after_id = \
+ self.widget.after(CHECKHIDE_TIME, self.checkhide_event)
def hide_event(self, event):
if not self.tipwindow: