diff options
-rw-r--r-- | library/filelist-bindings.tcl | 1 | ||||
-rw-r--r-- | library/treectrl.tcl | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/library/filelist-bindings.tcl b/library/filelist-bindings.tcl index f58ef82..c0523ea 100644 --- a/library/filelist-bindings.tcl +++ b/library/filelist-bindings.tcl @@ -1,6 +1,7 @@ bind TreeCtrlFileList <Double-ButtonPress-1> { TreeCtrl::FileListEditCancel %W TreeCtrl::DoubleButton1 %W %x %y + break } bind TreeCtrlFileList <Control-ButtonPress-1> { set TreeCtrl::Priv(selectMode) toggle diff --git a/library/treectrl.tcl b/library/treectrl.tcl index c973410..4e1cdd6 100644 --- a/library/treectrl.tcl +++ b/library/treectrl.tcl @@ -313,6 +313,16 @@ proc ::TreeCtrl::DoubleButton1 {w x y} { if {$id eq ""} { return } + if {[lindex $id 0] eq "item"} { + foreach {where item arg1 arg2} $id {} + if {$arg1 eq "button"} { + $w toggle $item + return + } elseif {$arg1 eq "line"} { + $w toggle $arg2 + return + } + } if {[lindex $id 0] eq "header"} { set column [lindex $id 1] set visCount 0 |