diff options
author | fvogel <fvogelnew1@free.fr> | 2019-04-19 09:13:55 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2019-04-19 09:13:55 (GMT) |
commit | 02c67cd81be2cf32ef9ab8c5a4f130ffd32da6fd (patch) | |
tree | b578eaa17ab8b85eb60539b20bf98aa4a1574c32 /tests | |
parent | 460822733ea7bd7f99696e4a0f90e02467e707a1 (diff) | |
parent | 3a81c1fb68b1e2b976651df7359209916ea5be63 (diff) | |
download | tk-02c67cd81be2cf32ef9ab8c5a4f130ffd32da6fd.zip tk-02c67cd81be2cf32ef9ab8c5a4f130ffd32da6fd.tar.gz tk-02c67cd81be2cf32ef9ab8c5a4f130ffd32da6fd.tar.bz2 |
Fix [368fa4561e]: ttk::treeview open/closed indicators can be toggled while hidden
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ttk/treeview.test | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/ttk/treeview.test b/tests/ttk/treeview.test index aa7e64a..be82f68 100644 --- a/tests/ttk/treeview.test +++ b/tests/ttk/treeview.test @@ -636,4 +636,21 @@ test treeview-3085489-2 "tag remove, no -tags" -setup { destroy .tv } -result [list] +test treeview-368fa4561e "indicators cannot be clicked on leafs" -setup { + pack [ttk::treeview .tv] + .tv insert {} end -id foo -text "<-- (1) Click the blank space to my left" + update +} -body { + foreach {x y w h} [.tv bbox foo #0] {} + set res [.tv item foo -open] + # using $h even for x computation is intentional here in order to simulate + # a mouse click on the (invisible since we're on a leaf) indicator + event generate .tv <ButtonPress-1> \ + -x [expr ($x + $h / 2)] \ + -y [expr ($y + $h / 2)] + lappend res [.tv item foo -open] + .tv insert foo end -text "sub" + lappend res [.tv item foo -open] +} -result {0 0 0} + tcltest::cleanupTests |