author | Paul Mackerras <paulus@samba.org> | |
Sun, 2 Mar 2008 23:11:08 +0000 (10:11 +1100) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Sun, 2 Mar 2008 23:11:08 +0000 (10:11 +1100) | ||
commit | ac1276ab6eaae8e10e409263370dca21b8772359 | |
tree | 957cf207331285566b33ef59881b506e305bdcb3 | tree | snapshot |
parent | f806f0fba8ce62f2c74f21419e2bd1e7ce9e565b | commit | diff |
gitk: Fix problems with target row stuff
Occasionally the target row stuff would scroll the display to some
uninteresting commit while reading. There were two problems: one
was that drawvisible would set targetrow even if there was no target
previously and no row selected, and the other was that it was possible
for the target row to get pushed down past numcommits, if drawvisible
was called after rows were added but before layoutmore got run.
The first problem is fixed by just not setting targetrow/id unless
there is a selected row or they were set previously.
The second problem is fixed by updating numcommits immediately new
rows are added. This leads to a simplification of layoutmore and
chewcommits but also means that some of the things that were done in
layoutmore now need to be done elsewhere, since layoutmore can no
longer use numcommits to know how much it has seen previously.
Hence the changes to getcommits, initlayout and setcanvscroll.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Occasionally the target row stuff would scroll the display to some
uninteresting commit while reading. There were two problems: one
was that drawvisible would set targetrow even if there was no target
previously and no row selected, and the other was that it was possible
for the target row to get pushed down past numcommits, if drawvisible
was called after rows were added but before layoutmore got run.
The first problem is fixed by just not setting targetrow/id unless
there is a selected row or they were set previously.
The second problem is fixed by updating numcommits immediately new
rows are added. This leads to a simplification of layoutmore and
chewcommits but also means that some of the things that were done in
layoutmore now need to be done elsewhere, since layoutmore can no
longer use numcommits to know how much it has seen previously.
Hence the changes to getcommits, initlayout and setcanvscroll.
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | diff | blob | history |