summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2007-10-30 18:52:06 (GMT)
committerhobbs <hobbs>2007-10-30 18:52:06 (GMT)
commit607376f9460c0887f957db5b9a79252753cdec00 (patch)
tree38a9e225cd3891c9e2c6515c08ac72fedbfb5b8c
parent48985f714df5e25b8ae6c03fca5110c0de600861 (diff)
downloadtk-607376f9460c0887f957db5b9a79252753cdec00.zip
tk-607376f9460c0887f957db5b9a79252753cdec00.tar.gz
tk-607376f9460c0887f957db5b9a79252753cdec00.tar.bz2
* library/entry.tcl: don't error with Clear event. [Bug 1509288]
-rw-r--r--ChangeLog4
-rw-r--r--library/entry.tcl5
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 3dc4748..7bd3769 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
2007-10-30 Jeff Hobbs <jeffh@ActiveState.com>
- * library/ttk/fonts.tcl: use size -12 TkFixedFont (was -10)
+ * library/entry.tcl: don't error with Clear event. [Bug 1509288]
+
+ * library/ttk/fonts.tcl: use size -12 TkFixedFont (was -10) on X11
2007-10-30 Donal K. Fellows <donal.k.fellows@manchester.ac.uk>
diff --git a/library/entry.tcl b/library/entry.tcl
index 32b1973..feda8ec 100644
--- a/library/entry.tcl
+++ b/library/entry.tcl
@@ -3,7 +3,7 @@
# This file defines the default bindings for Tk entry widgets and provides
# procedures that help in implementing those bindings.
#
-# RCS: @(#) $Id: entry.tcl,v 1.24 2005/07/25 09:06:00 dkf Exp $
+# RCS: @(#) $Id: entry.tcl,v 1.25 2007/10/30 18:52:06 hobbs Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
@@ -60,7 +60,8 @@ bind Entry <<Paste>> {
}
}
bind Entry <<Clear>> {
- %W delete sel.first sel.last
+ # ignore if there is no selection
+ catch { %W delete sel.first sel.last }
}
bind Entry <<PasteSelection>> {
if {$tk_strictMotif || ![info exists tk::Priv(mouseMoved)]