mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Issue #5219: Prevent event handler cascade in IDLE.
Patch by Roger Serwy.
This commit is contained in:
parent
71e51d66d6
commit
f163efd736
2 changed files with 7 additions and 1 deletions
|
@ -22,6 +22,7 @@ class CallTip:
|
||||||
self.parenline = self.parencol = None
|
self.parenline = self.parencol = None
|
||||||
self.lastline = None
|
self.lastline = None
|
||||||
self.hideid = self.checkhideid = None
|
self.hideid = self.checkhideid = None
|
||||||
|
self.checkhide_after_id = None
|
||||||
|
|
||||||
def position_window(self):
|
def position_window(self):
|
||||||
"""Check if needs to reposition the window, and if so - do it."""
|
"""Check if needs to reposition the window, and if so - do it."""
|
||||||
|
@ -102,7 +103,10 @@ class CallTip:
|
||||||
self.hidetip()
|
self.hidetip()
|
||||||
else:
|
else:
|
||||||
self.position_window()
|
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):
|
def hide_event(self, event):
|
||||||
if not self.tipwindow:
|
if not self.tipwindow:
|
||||||
|
|
|
@ -20,6 +20,8 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #5219: Prevent event handler cascade in IDLE.
|
||||||
|
|
||||||
- Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under
|
- Issue #14252: Fix subprocess.Popen.terminate() to not raise an error under
|
||||||
Windows when the child process has already exited.
|
Windows when the child process has already exited.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue