JAL-2053 fix erratic hidden column marker display
[jalview.git] / src / jalview / appletgui / ScalePanel.java
index 9106385..71ecb13 100755 (executable)
@@ -428,6 +428,7 @@ public class ScalePanel extends Panel implements MouseMotionListener,
     gg.setColor(Color.black);
 
     int scalestartx = (startx / 10) * 10;
+    int widthx = 1 + endx - startx;
 
     FontMetrics fm = gg.getFontMetrics(av.getFont());
     int y = avcharHeight - fm.getDescent();
@@ -479,7 +480,7 @@ public class ScalePanel extends Panel implements MouseMotionListener,
           res = av.getColumnSelection().findHiddenRegionPosition(i)
                   - startx;
 
-          if (res < 0 || res > endx - scalestartx)
+          if (res < 0 || res > widthx)
           {
             continue;
           }