JAL-192 patch off-by-one for pathological gap case
authorJim Procter <jprocter@issues.jalview.org>
Fri, 6 May 2016 13:02:25 +0000 (14:02 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Fri, 6 May 2016 13:02:25 +0000 (14:02 +0100)
JAL-2099 fix incorrect numbering with hidden-columns

src/jalview/gui/ScalePanel.java

index 194066e..41b46a7 100755 (executable)
@@ -529,13 +529,14 @@ public class ScalePanel extends JPanel implements MouseMotionListener,
     {
       if (((i - refSp) % 10) == 0)
       {
-        iadj = av.getColumnSelection().adjustForHiddenColumns(i - 1);
         if (refSeq == null)
         {
+          iadj = av.getColumnSelection().adjustForHiddenColumns(i - 1) + 1;
           string = String.valueOf(iadj);
         }
         else
         {
+          iadj = av.getColumnSelection().adjustForHiddenColumns(i - 1);
           refN = refSeq.findPosition(iadj);
           // TODO show bounds if position is a gap
           // - ie L--R -> "1L|2R" for