From: gmungoc Date: Fri, 28 Jul 2017 13:17:08 +0000 (+0200) Subject: JAL-147 corrected status bar message for wrapped scrolled right view X-Git-Tag: Release_2_10_3b1~132^2~33 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=1eb2e0fdf5b6c3814e07d5d795bc5c4277a77fea;p=jalview.git JAL-147 corrected status bar message for wrapped scrolled right view --- diff --git a/src/jalview/appletgui/SeqPanel.java b/src/jalview/appletgui/SeqPanel.java index e4e3640..d000c73 100644 --- a/src/jalview/appletgui/SeqPanel.java +++ b/src/jalview/appletgui/SeqPanel.java @@ -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 { diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index e3cf330..26096e6 100644 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -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 {