From: gmungoc Date: Wed, 20 Mar 2019 14:35:34 +0000 (+0000) Subject: JAL-3093 fine tuning of SeqPanel tooltip X-Git-Tag: Release_2_11_0~17^2~41 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=dc2734d988e10f3e76dda02d9913b611f6713552;p=jalview.git JAL-3093 fine tuning of SeqPanel tooltip --- diff --git a/src/jalview/gui/AlignFrame.java b/src/jalview/gui/AlignFrame.java index a587ac3..4ff1b4f 100644 --- a/src/jalview/gui/AlignFrame.java +++ b/src/jalview/gui/AlignFrame.java @@ -974,7 +974,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener, @Override public void setStatus(String text) { - statusBar.setText(text); + statusBar.setText(text == null || text.isEmpty() ? " " : text); } /* diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 4a1a9ee..1176df5 100644 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -314,8 +314,10 @@ public class SeqPanel extends JPanel } else { - seqIndex = Math.min((y / charHeight) + av.getRanges().getStartSeq(), + ViewportRanges ranges = av.getRanges(); + seqIndex = Math.min((y / charHeight) + ranges.getStartSeq(), alignmentHeight - 1); + seqIndex = Math.min(seqIndex, ranges.getEndSeq()); } return new MousePos(col, seqIndex, annIndex); @@ -1924,6 +1926,7 @@ public class SeqPanel extends JPanel @Override public void mouseExited(MouseEvent e) { + lastMousePosition = null; ap.alignFrame.setStatus(" "); if (av.getWrapAlignment()) {