File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -826,7 +826,7 @@ proc ::ttk::treeview::DoubleClick {w x y} {
826826 set element [$w identify element $x $y ]
827827 if {$item eq " " } return
828828
829- if {$element eq " Treeitem.indicator" } {
829+ if {[ string match " * Treeitem.indicator" $element ] } {
830830 ToggleOpenState $w $item
831831 } elseif {[info procs ActivateItem] ne " " } {
832832 ActivateHandler $w $item $column
@@ -986,12 +986,12 @@ proc ::ttk::treeview::Press {w x y} {
986986 heading { Heading.press $w $x $y }
987987 separator { Resize.press $w $x $y }
988988 tree {
989- switch -- [$w identify element $x $y ] {
990- Treeitem.indicator {
989+ switch -glob - - [$w identify element $x $y ] {
990+ * Treeitem.indicator {
991991 ToggleOpenState $w [$w identify item $x $y ]
992992 }
993- Checkbutton.button -
994- Checkbutton.indicator { ToggleSelected $w $x $y }
993+ * Checkbutton.button -
994+ * Checkbutton.indicator { ToggleSelected $w $x $y }
995995 default { Select.press $w $x $y }
996996 }
997997 }
@@ -1403,7 +1403,7 @@ proc ::ttk::treeview::CloseItem {w item} {
14031403#
14041404proc ::ttk::treeview::ToggleOpenState {w item} {
14051405 # don't allow toggling on indicators that
1406- # are not present in front of leaf items
1406+ # are present in front of leaf items
14071407 if {![$w haschildren $item ]} {
14081408 return
14091409 }
You can’t perform that action at this time.
0 commit comments