mirror of
https://github.com/python/cpython
synced 2026-09-29 10:35:30 +03:00
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.
This commit is contained in:
parent
68db9dd07a
commit
38507ae614
1 changed files with 6 additions and 0 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue