]> granicus.if.org Git - python/commitdiff
Finally fix SF bug #441172, using a variant of patch ##443626:
authorGuido van Rossum <guido@python.org>
Sat, 11 Aug 2001 04:37:07 +0000 (04:37 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 11 Aug 2001 04:37:07 +0000 (04:37 +0000)
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.

Tools/idle/TreeWidget.py

index 60eefdc220ece6475400b63dc67a0dce24957b0f..be80a635e58e688593dd7ab330ff0ea0cd7d1897 100644 (file)
@@ -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()