summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f5f3c2e)
raw | patch | inline | side by side (parent: f5f3c2e)
author | Paul Mackerras <paulus@samba.org> | |
Fri, 14 Sep 2007 23:04:11 +0000 (09:04 +1000) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Fri, 14 Sep 2007 23:12:26 +0000 (09:12 +1000) |
We weren't updating the rowfinal list in insertrow and removerow, so
it was getting out of sync with rowidlist, which resulted in Tcl errors.
This also optimizes the setting of rowfinal in layoutrows a bit.
Signed-off-by: Paul Mackerras <paulus@samba.org>
it was getting out of sync with rowidlist, which resulted in Tcl errors.
This also optimizes the setting of rowfinal in layoutrows a bit.
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index a042efe260bd62ac0f8d36e4d35dbe870ab7a2d5..fd6bbab3ed53907bc69d194ba081e1d90ba53964 100755 (executable)
--- a/gitk
+++ b/gitk
set idlist {}
if {$row > 0} {
- foreach id [lindex $rowidlist [expr {$row - 1}]] {
+ set rm1 [expr {$row - 1}]
+ foreach id [lindex $rowidlist $rm1] {
if {$id ne {}} {
lappend idlist $id
}
}
+ set final [lindex $rowfinal $rm1]
}
for {} {$row < $endrow} {incr row} {
set rm1 [expr {$row - 1}]
- if {$rm1 < 0 || [lindex $rowidlist $rm1] eq {}} {
+ if {$rm1 < 0 || $idlist eq {}} {
set idlist [make_idlist $row]
set final 1
} else {
set id [lindex $displayorder $rm1]
- set final [lindex $rowfinal $rm1]
set col [lsearch -exact $idlist $id]
set idlist [lreplace $idlist $col $col]
foreach p [lindex $parentlist $rm1] {
} elseif {$row < $l} {
if {![rowsequal $idlist [lindex $rowidlist $row]]} {
lset rowidlist $row $idlist
- lset rowfinal $row $final
changedrow $row
}
+ lset rowfinal $row $final
} else {
set pad [ntimes [expr {$row - $l}] {}]
set rowidlist [concat $rowidlist $pad]
# on that row and below will move down one row.
proc insertrow {row newcmit} {
global displayorder parentlist commitlisted children
- global commitrow curview rowidlist rowisopt numcommits
+ global commitrow curview rowidlist rowisopt rowfinal numcommits
global numcommits
global selectedline commitidx ordertok
}
set rowidlist [linsert $rowidlist $row $idlist]
set rowisopt [linsert $rowisopt $row 0]
+ set rowfinal [linsert $rowfinal $row [lindex $rowfinal $row]]
incr numcommits
# Remove a commit that was inserted with insertrow on row $row.
proc removerow {row} {
global displayorder parentlist commitlisted children
- global commitrow curview rowidlist rowisopt numcommits
+ global commitrow curview rowidlist rowisopt rowfinal numcommits
global numcommits
global linesegends selectedline commitidx
set rowidlist [lreplace $rowidlist $row $row]
set rowisopt [lreplace $rowisopt $row $row]
+ set rowfinal [lreplace $rowfinal $row $row]
incr numcommits -1