From e95068d2d315bc185ba64c986e1d1ebbd11f0cad Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Thu, 27 Jul 2006 07:42:06 +0000 Subject: [PATCH] Cant have col less than 0 --- src/jalview/gui/ScalePanel.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/jalview/gui/ScalePanel.java b/src/jalview/gui/ScalePanel.java index a6027aa..54924d0 100755 --- a/src/jalview/gui/ScalePanel.java +++ b/src/jalview/gui/ScalePanel.java @@ -207,6 +207,8 @@ public class ScalePanel extends JPanel implements MouseMotionListener, MouseList mouseDragging = true; int res = (evt.getX() / av.getCharWidth()) + av.getStartRes(); + if(res<0) + res = 0; if(av.hasHiddenColumns) res = av.getColumnSelection().adjustForHiddenColumns(res); @@ -229,7 +231,6 @@ public class ScalePanel extends JPanel implements MouseMotionListener, MouseList - SequenceGroup sg = av.getSelectionGroup(); if (sg != null) -- 1.7.10.2