summaryrefslogtreecommitdiffstats
path: root/Tools/idle/TreeWidget.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/idle/TreeWidget.py')
-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()