From baaf7e4a88b74ac587b78b9f964ea94b14238f59 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 26 Oct 2006 09:37:18 +0000 Subject: [PATCH] Dont scroll off width-1 --- src/jalview/appletgui/SeqPanel.java | 2 +- src/jalview/gui/SeqPanel.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jalview/appletgui/SeqPanel.java b/src/jalview/appletgui/SeqPanel.java index 8d42655..0596468 100755 --- a/src/jalview/appletgui/SeqPanel.java +++ b/src/jalview/appletgui/SeqPanel.java @@ -1266,7 +1266,7 @@ public class SeqPanel y = av.alignment.getHeight() -1; } - if(res>av.alignment.getWidth()) + if(res>=av.alignment.getWidth()) res = av.alignment.getWidth()-1; if (stretchGroup.getEndRes() == res) diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index b57305a..e51b13c 100755 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -1449,7 +1449,7 @@ public class SeqPanel extends JPanel implements MouseListener, return; } - if(res> av.alignment.getWidth()) + if(res>= av.alignment.getWidth()) { res = av.alignment.getWidth()-1; } -- 1.7.10.2