summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2019-11-02 18:08:51 (GMT)
committerdgp <dgp@users.sourceforge.net>2019-11-02 18:08:51 (GMT)
commitf1e2ff7d1e64f611921e1fe537875f8939f50134 (patch)
tree3d50292e2e3d27680bbd2509c4b3e28ce064267a /library
parent2c7448ee7a61cc6f89bfffb8410af6662c9ce6ce (diff)
parent19e72587e7d675d197daecdb202e28b64e428992 (diff)
downloadtk-f1e2ff7d1e64f611921e1fe537875f8939f50134.zip
tk-f1e2ff7d1e64f611921e1fe537875f8939f50134.tar.gz
tk-f1e2ff7d1e64f611921e1fe537875f8939f50134.tar.bz2
merge 8.6
Diffstat (limited to 'library')
-rw-r--r--library/ttk/treeview.tcl15
1 files changed, 12 insertions, 3 deletions
diff --git a/library/ttk/treeview.tcl b/library/ttk/treeview.tcl
index 4158739..df188b7 100644
--- a/library/ttk/treeview.tcl
+++ b/library/ttk/treeview.tcl
@@ -120,9 +120,18 @@ proc ttk::treeview::ActivateHeading {w heading} {
variable State
if {$w != $State(activeWidget) || $heading != $State(activeHeading)} {
- if {[winfo exists $State(activeWidget)] && $State(activeHeading) != {}
- && $State(activeHeading) in [$State(activeWidget) cget -displaycolumns]} {
- $State(activeWidget) heading $State(activeHeading) state !active
+ if {[winfo exists $State(activeWidget)] && $State(activeHeading) != {}} {
+ # It may happen that $State(activeHeading) no longer corresponds
+ # to an existing display column. This happens for instance when
+ # changing -displaycolumns in a bound script when this change
+ # triggers a <Leave> event. A proc checking if the display column
+ # $State(activeHeading) is really still present or not could be
+ # written but it would need to check several special cases:
+ # a. -displaycolumns "#all" or being an explicit columns list
+ # b. column #0 display is not governed by the -displaycolumn
+ # list but by the value of the -show option
+ # --> Let's rather catch the following line.
+ catch {$State(activeWidget) heading $State(activeHeading) state !active}
}
if {$heading != {}} {
$w heading $heading state active