JAL-147 corrected status bar message for wrapped scrolled right view
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 28 Jul 2017 13:17:08 +0000 (15:17 +0200)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 28 Jul 2017 13:17:08 +0000 (15:17 +0200)
src/jalview/appletgui/SeqPanel.java
src/jalview/gui/SeqPanel.java

index e4e3640..d000c73 100644 (file)
@@ -643,8 +643,8 @@ public class SeqPanel extends Panel implements MouseMotionListener,
       wrappedBlock += startRes / cwidth;
       int startOffset = startRes % cwidth; // in case start is scrolled right
                                            // from 0
-      res = wrappedBlock * cwidth
-              + Math.min(cwidth - 1, startOffset + x / av.getCharWidth());
+      res = wrappedBlock * cwidth + startOffset
+              + +Math.min(cwidth - 1, x / av.getCharWidth());
     }
     else
     {
index e3cf330..26096e6 100644 (file)
@@ -216,8 +216,8 @@ public class SeqPanel extends JPanel implements MouseListener,
       wrappedBlock += startRes / cwidth;
       // allow for wrapped view scrolled right (possible from Overview)
       int startOffset = startRes % cwidth;
-      res = wrappedBlock * cwidth
-              + Math.min(cwidth - 1, startOffset + x / av.getCharWidth());
+      res = wrappedBlock * cwidth + startOffset
+              + +Math.min(cwidth - 1, x / av.getCharWidth());
     }
     else
     {