summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortreectrl <treectrl>2002-12-21 21:59:01 (GMT)
committertreectrl <treectrl>2002-12-21 21:59:01 (GMT)
commit2c0368d012fd32b985f702d4461ac40d0e39f4f4 (patch)
treee0b2e3441134248361b64f62af31a3570105140c
parent38c497adc6727ac79dcaec378c67f795f9e808f2 (diff)
downloadtktreectrl-2c0368d012fd32b985f702d4461ac40d0e39f4f4.zip
tktreectrl-2c0368d012fd32b985f702d4461ac40d0e39f4f4.tar.gz
tktreectrl-2c0368d012fd32b985f702d4461ac40d0e39f4f4.tar.bz2
Double-click button fix.
-rw-r--r--library/filelist-bindings.tcl1
-rw-r--r--library/treectrl.tcl10
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