mirror of
https://github.com/python/cpython.git
synced 2025-10-03 05:35:59 +00:00
Merge Py Idle changes:
Rev 1.6 GvR 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. Rev 1.7 Geiger Ho / GvR (previously applied - Idlefork Rev 1.3) Rev 1.8 doerwalter (string methods)
This commit is contained in:
parent
089a64a749
commit
2a5e350265
1 changed files with 6 additions and 1 deletions
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import string
|
|
||||||
from Tkinter import *
|
from Tkinter import *
|
||||||
import imp
|
import imp
|
||||||
|
|
||||||
|
@ -291,6 +290,12 @@ class TreeNode:
|
||||||
self.canvas.focus_set()
|
self.canvas.focus_set()
|
||||||
|
|
||||||
def edit_cancel(self, event=None):
|
def edit_cancel(self, event=None):
|
||||||
|
try:
|
||||||
|
entry = self.entry
|
||||||
|
del self.entry
|
||||||
|
except AttributeError:
|
||||||
|
return
|
||||||
|
entry.destroy()
|
||||||
self.drawtext()
|
self.drawtext()
|
||||||
self.canvas.focus_set()
|
self.canvas.focus_set()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue