From: Martin v. Löwis Date: Sat, 7 Jun 2003 19:53:55 +0000 (+0000) Subject: Patch #749191: Delete commands in after_cancel. X-Git-Tag: 2.2~75 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3442211acefc306b5570f86cc26b2765a709390d;p=thirdparty%2FPython%2Fcpython.git Patch #749191: Delete commands in after_cancel. --- diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py index 50b259acc260..27a4c6fd6846 100644 --- a/Lib/lib-tk/Tkinter.py +++ b/Lib/lib-tk/Tkinter.py @@ -454,6 +454,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."""