git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d716c9b
)
JAL-3002 don't use fastPaint for page up/down
bug/JAL-3002fastPaintWrapped
author
gmungoc
<g.m.carstairs@dundee.ac.uk>
Fri, 25 May 2018 15:16:03 +0000
(16:16 +0100)
committer
gmungoc
<g.m.carstairs@dundee.ac.uk>
Fri, 25 May 2018 15:16:03 +0000
(16:16 +0100)
src/jalview/gui/SeqCanvas.java
patch
|
blob
|
history
diff --git
a/src/jalview/gui/SeqCanvas.java
b/src/jalview/gui/SeqCanvas.java
index
2d8eb7d
..
c89ba56
100755
(executable)
--- a/
src/jalview/gui/SeqCanvas.java
+++ b/
src/jalview/gui/SeqCanvas.java
@@
-1740,7
+1740,7
@@
public class SeqCanvas extends JComponent implements ViewportListenerI
}
ViewportRanges vpRanges = av.getRanges();
}
ViewportRanges vpRanges = av.getRanges();
- int range = vpRanges.getEndRes() - vpRanges.getStartRes();
+ int range = vpRanges.getEndRes() - vpRanges.getStartRes() + 1;
if (scrollX > range)
{
scrollX = range;
if (scrollX > range)
{
scrollX = range;
@@
-1809,10
+1809,10
@@
public class SeqCanvas extends JComponent implements ViewportListenerI
{
ViewportRanges ranges = av.getRanges();
{
ViewportRanges ranges = av.getRanges();
- if (Math.abs(scrollX) > ranges.getViewportWidth())
+ if (Math.abs(scrollX) >= ranges.getViewportWidth())
{
/*
{
/*
- * shift of more than one view width is
+ * shift of one view width or more is
* overcomplicated to handle in this method
*/
fastPaint = false;
* overcomplicated to handle in this method
*/
fastPaint = false;
@@
-2003,10
+2003,17
@@
public class SeqCanvas extends JComponent implements ViewportListenerI
while (y >= 0)
{
while (y >= 0)
{
+ /*
+ * shift 'widthToCopy' residues by 'positions' places to the right
+ */
gg.copyArea(copyFromLeftStart, y, widthToCopy, heightToCopy,
positions * charWidth, 0);
if (y > 0)
{
gg.copyArea(copyFromLeftStart, y, widthToCopy, heightToCopy,
positions * charWidth, 0);
if (y > 0)
{
+ /*
+ * copy 'positions' residue from the row above (right hand end)
+ * to this row's left hand end
+ */
gg.copyArea(copyFromRightStart, y - wrappedRepeatHeightPx,
positions * charWidth, heightToCopy, -widthToCopy,
wrappedRepeatHeightPx);
gg.copyArea(copyFromRightStart, y - wrappedRepeatHeightPx,
positions * charWidth, heightToCopy, -widthToCopy,
wrappedRepeatHeightPx);