diff options
author | Guido van Rossum <guido@python.org> | 2001-08-11 04:37:07 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-08-11 04:37:07 (GMT) |
commit | 38507ae614b2b5ef4a888e3b94a3707576021291 (patch) | |
tree | 915a7e87f69e8d999096b8694718cfa3400dee76 /Tools | |
parent | 68db9dd07a03831be3be94777addb8e6fde5ac55 (diff) | |
download | cpython-38507ae614b2b5ef4a888e3b94a3707576021291.zip cpython-38507ae614b2b5ef4a888e3b94a3707576021291.tar.gz cpython-38507ae614b2b5ef4a888e3b94a3707576021291.tar.bz2 |
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.
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/idle/TreeWidget.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Tools/idle/TreeWidget.py b/Tools/idle/TreeWidget.py index 60eefdc..be80a63 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() |