git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into features/JAL-2446NCList
[jalview.git]
/
src
/
jalview
/
viewmodel
/
ViewportRanges.java
diff --git
a/src/jalview/viewmodel/ViewportRanges.java
b/src/jalview/viewmodel/ViewportRanges.java
index
743d212
..
4eb8c95
100644
(file)
--- a/
src/jalview/viewmodel/ViewportRanges.java
+++ b/
src/jalview/viewmodel/ViewportRanges.java
@@
-123,7
+123,7
@@
public class ViewportRanges extends ViewportProperties
int oldstartres = this.startRes;
if (start > getVisibleAlignmentWidth() - 1)
{
int oldstartres = this.startRes;
if (start > getVisibleAlignmentWidth() - 1)
{
- startRes = getVisibleAlignmentWidth() - 1;
+ startRes = Math.max(getVisibleAlignmentWidth() - 1, 0);
}
else if (start < 0)
{
}
else if (start < 0)
{
@@
-141,7
+141,7
@@
public class ViewportRanges extends ViewportProperties
}
else if (end > getVisibleAlignmentWidth() - 1)
{
}
else if (end > getVisibleAlignmentWidth() - 1)
{
- endRes = getVisibleAlignmentWidth() - 1;
+ endRes = Math.max(getVisibleAlignmentWidth() - 1, 0);
}
else
{
}
else
{
@@
-208,7
+208,7
@@
public class ViewportRanges extends ViewportProperties
int oldstartseq = this.startSeq;
if (start > getVisibleAlignmentHeight() - 1)
{
int oldstartseq = this.startSeq;
if (start > getVisibleAlignmentHeight() - 1)
{
- startSeq = getVisibleAlignmentHeight() - 1;
+ startSeq = Math.max(getVisibleAlignmentHeight() - 1, 0);
}
else if (start < 0)
{
}
else if (start < 0)
{
@@
-222,7
+222,7
@@
public class ViewportRanges extends ViewportProperties
int oldendseq = this.endSeq;
if (end >= getVisibleAlignmentHeight())
{
int oldendseq = this.endSeq;
if (end >= getVisibleAlignmentHeight())
{
- endSeq = getVisibleAlignmentHeight() - 1;
+ endSeq = Math.max(getVisibleAlignmentHeight() - 1, 0);
}
else if (end < 0)
{
}
else if (end < 0)
{