diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2012-03-13 14:46:22 -0700 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2012-03-13 14:46:22 -0700 |
commit | f163efd73682ee9d370c17a4bbd4c4514471a97a (patch) | |
tree | 4cd7047586a29ade181f35b4ca98ce3d514f7cfc /Lib/idlelib/CallTipWindow.py | |
parent | 71e51d66d68708fc0a991ec99e4f37e09182d413 (diff) | |
download | cpython-git-f163efd73682ee9d370c17a4bbd4c4514471a97a.tar.gz |
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.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/idlelib/CallTipWindow.py b/Lib/idlelib/CallTipWindow.py index 22238855c1..7bb62b4e0b 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: |