summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-08-11 04:37:07 (GMT)
committerGuido van Rossum <guido@python.org>2001-08-11 04:37:07 (GMT)
commit38507ae614b2b5ef4a888e3b94a3707576021291 (patch)
tree915a7e87f69e8d999096b8694718cfa3400dee76 /Tools
parent68db9dd07a03831be3be94777addb8e6fde5ac55 (diff)
downloadcpython-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.py6
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()