gitk: Fix a bug in collapsing deeply nested trees

To reproduce: expand a tree like this, then collapse A:

+A
 +B
   C
   D

The result is:

-A
   C
   D

I.e. sub-nodes expanded from the last sub-node of the item
being collapsed are not removed.

Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
Alexander Gavrilov 2008-09-08 11:28:16 +04:00 committed by Paul Mackerras
parent d277e89f87
commit b8a640ee1a

2
gitk
View File

@ -2706,7 +2706,7 @@ proc treeopendir {w dir} {
$w insert e:$ix $e [highlight_tag $de]
}
}
$w mark gravity e:$ix left
$w mark gravity e:$ix right
$w conf -state disabled
set treediropen($dir) 1
set top [lindex [split [$w index @0,0] .] 0]