Dont scroll off width-1
authoramwaterhouse <Andrew Waterhouse>
Thu, 26 Oct 2006 09:37:18 +0000 (09:37 +0000)
committeramwaterhouse <Andrew Waterhouse>
Thu, 26 Oct 2006 09:37:18 +0000 (09:37 +0000)
src/jalview/appletgui/SeqPanel.java
src/jalview/gui/SeqPanel.java

index 8d42655..0596468 100755 (executable)
@@ -1266,7 +1266,7 @@ public class SeqPanel
         y = av.alignment.getHeight() -1;\r
       }\r
 \r
-      if(res>av.alignment.getWidth())\r
+      if(res>=av.alignment.getWidth())\r
         res = av.alignment.getWidth()-1;\r
 \r
       if (stretchGroup.getEndRes() == res)\r
index b57305a..e51b13c 100755 (executable)
@@ -1449,7 +1449,7 @@ public class SeqPanel extends JPanel implements MouseListener,
             return;\r
        }\r
 \r
-        if(res> av.alignment.getWidth())\r
+        if(res>= av.alignment.getWidth())\r
         {\r
           res = av.alignment.getWidth()-1;\r
         }\r