summaryrefslogtreecommitdiffstats
path: root/library/ttk
diff options
context:
space:
mode:
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 {