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:
7f4da0a
)
JAL-2439 Out-by-one in setting endRes/endSeq
author
kiramt
<k.mourao@dundee.ac.uk>
Thu, 16 Mar 2017 12:12:31 +0000
(12:12 +0000)
committer
kiramt
<k.mourao@dundee.ac.uk>
Thu, 16 Mar 2017 12:12:31 +0000
(12:12 +0000)
src/jalview/viewmodel/ViewportPositionProps.java
patch
|
blob
|
history
diff --git
a/src/jalview/viewmodel/ViewportPositionProps.java
b/src/jalview/viewmodel/ViewportPositionProps.java
index
d143130
..
61dd18c
100644
(file)
--- a/
src/jalview/viewmodel/ViewportPositionProps.java
+++ b/
src/jalview/viewmodel/ViewportPositionProps.java
@@
-108,9
+108,9
@@
public class ViewportPositionProps extends ViewportProperties
*/
public void setEndRes(int res)
{
- if (res > al.getWidth())
+ if (res >= al.getWidth())
{
- res = al.getWidth();
+ res = al.getWidth() - 1;
}
else if (res < 1)
{
@@
-146,9
+146,9
@@
public class ViewportPositionProps extends ViewportProperties
*/
public void setEndSeq(int seq)
{
- if (seq > al.getHeight())
+ if (seq >= al.getHeight())
{
- seq = al.getHeight();
+ seq = al.getHeight() - 1;
}
else if (seq < 1)
{