diff options
Diffstat (limited to 'library/ttk/treeview.tcl')
-rw-r--r-- | library/ttk/treeview.tcl | 6 |
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 { |