From: Guido van Rossum Date: Sat, 11 Aug 2001 04:37:07 +0000 (+0000) Subject: Finally fix SF bug #441172, using a variant of patch ##443626: X-Git-Tag: v2.2a3~645 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=38507ae614b2b5ef4a888e3b94a3707576021291;p=thirdparty%2FPython%2Fcpython.git Finally fix SF bug #441172, using a variant of patch ##443626: canceling an edit operation would not revert the value of the field. The fix takes care to destroy the Entry object, as suggested in the patch. --- diff --git a/Tools/idle/TreeWidget.py b/Tools/idle/TreeWidget.py index 60eefdc220ec..be80a635e58e 100644 --- a/Tools/idle/TreeWidget.py +++ b/Tools/idle/TreeWidget.py @@ -291,6 +291,12 @@ class TreeNode: self.canvas.focus_set() def edit_cancel(self, event=None): + try: + entry = self.entry + del self.entry + except AttributeError: + return + entry.destroy() self.drawtext() self.canvas.focus_set()