aboutsummaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-03-31 09:54:24 +1100
committerPaul Mackerras <paulus@samba.org>2006-03-31 09:54:24 +1100
commitf3408449622cad37ce29f23754c8e7a8fb453ff1 (patch)
treee8f81ca4dd1a609ef45ab070fc7d9bf8b156f5df /gitk
parent7b5ff7e7d715391b9745a46fcfaacf1d97d4dc9f (diff)
downloadgit-f3408449622cad37ce29f23754c8e7a8fb453ff1.tar.gz
git-f3408449622cad37ce29f23754c8e7a8fb453ff1.tar.xz
gitk: Prevent parent link from overwriting commit headline
When I made drawlineseg responsible for drawing the link to the first child rather than drawparentlinks, that meant that the right-most X value computed by drawparentlinks didn't include those first-child links, and thus the first-child link could go over the top of the commit headline. This fixes it. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk18
1 files changed, 9 insertions, 9 deletions
diff --git a/gitk b/gitk
index b61e13826..9c435873f 100755
--- a/gitk
+++ b/gitk
@@ -1304,17 +1304,21 @@ proc drawparentlinks {id row col olds} {
# rmx = right-most X coord used
set rmx 0
foreach p $olds {
+ set i [lsearch -exact $ids $p]
+ if {$i < 0} {
+ puts "oops, parent $p of $id not in list"
+ continue
+ }
+ set x2 [xc $row2 $i]
+ if {$x2 > $rmx} {
+ set rmx $x2
+ }
if {[info exists idrowranges($p)] &&
$row2 == [lindex $idrowranges($p) 0] &&
$row2 < [lindex $idrowranges($p) 1]} {
# drawlineseg will do this one for us
continue
}
- set i [lsearch -exact $ids $p]
- if {$i < 0} {
- puts "oops, parent $p of $id not in list"
- continue
- }
assigncolor $p
# should handle duplicated parents here...
set coords [list $x $y]
@@ -1323,10 +1327,6 @@ proc drawparentlinks {id row col olds} {
} elseif {$i > $col + 1} {
lappend coords [xc $row [expr {$i - 1}]] $y
}
- set x2 [xc $row2 $i]
- if {$x2 > $rmx} {
- set rmx $x2
- }
lappend coords $x2 $y2
set t [$canv create line $coords -width [linewidth $p] \
-fill $colormap($p) -tags lines.$p]