From 1eb2e0fdf5b6c3814e07d5d795bc5c4277a77fea Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 28 Jul 2017 15:17:08 +0200 Subject: [PATCH] JAL-147 corrected status bar message for wrapped scrolled right view --- src/jalview/appletgui/SeqPanel.java | 4 ++-- src/jalview/gui/SeqPanel.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 { -- 1.7.10.2