diff options
author | fvogel <fvogelnew1@free.fr> | 2016-01-06 20:30:24 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2016-01-06 20:30:24 (GMT) |
commit | f15ea04198e91649339310b7acf546b91e768e00 (patch) | |
tree | 1db354a2110800a66c4b1f1904be1d5cc1e6880c /tests | |
parent | cdd92760dc29a1f4a20a34f60619873dd7788d65 (diff) | |
parent | 3c29497582459e3551edc32afd714b59494f26ae (diff) | |
download | tk-f15ea04198e91649339310b7acf546b91e768e00.zip tk-f15ea04198e91649339310b7acf546b91e768e00.tar.gz tk-f15ea04198e91649339310b7acf546b91e768e00.tar.bz2 |
Fixed bug [3102228] - <<ListboxSelect>> doesn't fire when selection lost
Diffstat (limited to 'tests')
-rw-r--r-- | tests/listbox.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/listbox.test b/tests/listbox.test index 01a8e7a..f50267e 100644 --- a/tests/listbox.test +++ b/tests/listbox.test @@ -3092,6 +3092,21 @@ test listbox-31.1 {<<ListboxSelect>> event} -setup { unset -nocomplain res } -result {0 2 1} +test listbox-31.2 {<<ListboxSelect>> event on lost selection} -setup { + destroy .l +} -body { + pack [listbox .l -exportselection true] + update + bind .l <<ListboxSelect>> {lappend res [list [selection own] [%W curselection]]} + .l insert end a b c + focus -force .l + event generate .l <1> -x 5 -y 5 ; # <<ListboxSelect>> fires + selection clear ; # <<ListboxSelect>> fires again + set res +} -cleanup { + destroy .l +} -result {{.l 0} {{} {}}} + resetGridInfo deleteWindows option clear |