X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FSeqPanel.java;h=163ae25fd3a45a152283f246e93560bfa0eac21d;hb=3ffda7877bae6500636fcccaf1a9eae8bff2f45c;hp=8a49092db31eaf9e943868b9f0f80a01333df189;hpb=00816d26e65bf0c98538773087a8c7519aea672e;p=jalview.git diff --git a/src/jalview/gui/SeqPanel.java b/src/jalview/gui/SeqPanel.java index 8a49092..163ae25 100644 --- a/src/jalview/gui/SeqPanel.java +++ b/src/jalview/gui/SeqPanel.java @@ -275,6 +275,9 @@ public class SeqPanel extends JPanel /** * Computes the column and sequence row (and possibly annotation row when in * wrapped mode) for the given mouse position + *

+ * Mouse position is not set if in wrapped mode with the cursor either between + * sequences, or over the left or right vertical scale. * * @param evt * @return @@ -342,6 +345,9 @@ public class SeqPanel extends JPanel /** * Returns the aligned sequence position (base 0) at the mouse position, or * the closest visible one + *

+ * Returns -1 if in wrapped mode with the mouse over either left or right + * vertical scale. * * @param evt * @return @@ -909,11 +915,12 @@ public class SeqPanel extends JPanel AlignFrame af = Desktop.getAlignFrameFor(complement); FeatureRendererModel fr2 = af.getFeatureRenderer(); - int j = results.getSize(); + List matches = results.getResults(); + int j = matches.size(); List infos = new ArrayList<>(); for (int i = 0; i < j; i++) { - SearchResultMatchI match = results.getResults().get(i); + SearchResultMatchI match = matches.get(i); int pos = match.getStart(); if (pos == match.getEnd()) {