Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 38507ae

Browse files
committed
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.
1 parent 68db9dd commit 38507ae

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Tools/idle/TreeWidget.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,12 @@ def edit_finish(self, event=None):
291291
self.canvas.focus_set()
292292

293293
def edit_cancel(self, event=None):
294+
try:
295+
entry = self.entry
296+
del self.entry
297+
except AttributeError:
298+
return
299+
entry.destroy()
294300
self.drawtext()
295301
self.canvas.focus_set()
296302

0 commit comments

Comments
 (0)