summaryrefslogtreecommitdiffstats
path: root/library/ttk
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2019-04-10 19:50:53 (GMT)
committerfvogel <fvogelnew1@free.fr>2019-04-10 19:50:53 (GMT)
commitd95284c405fba9c6f6222e1af119f5ba73b4443a (patch)
tree2108261f32fafecb3be91a5556dbd34fab320f07 /library/ttk
parent7c1acea352995895a3152bfa54230a3b6e3091f6 (diff)
downloadtk-d95284c405fba9c6f6222e1af119f5ba73b4443a.zip
tk-d95284c405fba9c6f6222e1af119f5ba73b4443a.tar.gz
tk-d95284c405fba9c6f6222e1af119f5ba73b4443a.tar.bz2
Fix [368fa4561e]: ttk::treeview open/closed indicators can be toggled while hidden
Diffstat (limited to 'library/ttk')
-rw-r--r--library/ttk/treeview.tcl6
1 files changed, 6 insertions, 0 deletions
diff --git a/library/ttk/treeview.tcl b/library/ttk/treeview.tcl
index 1ed87db..6a6f5d4 100644
--- a/library/ttk/treeview.tcl
+++ b/library/ttk/treeview.tcl
@@ -336,6 +336,12 @@ proc ttk::treeview::CloseItem {w item} {
## Toggle -- toggle opened/closed state of item
#
proc ttk::treeview::Toggle {w item} {
+ # don't allow toggling on indicators that
+ # are not present in front of leaf items
+ if {[$w children $item] == {}} {
+ return
+ }
+ # not a leaf, toggle!
if {[$w item $item -open]} {
CloseItem $w $item
} else {