From 0f9e525bdffd3ac25256462a14806956434caeb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 7 Jun 2003 19:52:38 +0000 Subject: Patch #749191: Delete commands in after_cancel. Will backport to 2.2. --- Lib/lib-tk/Tkinter.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index 2025ba8..11dae12 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -474,6 +474,12 @@ class Misc: Identifier returned by after or after_idle must be given as first parameter.""" + try: + (script, type) = self.tk.splitlist( + self.tk.call('after', 'info', id)) + self.deletecommand(script) + except TclError: + pass self.tk.call('after', 'cancel', id) def bell(self, displayof=0): """Ring a display's bell.""" -- cgit v0.12