From: Jim Procter Date: Fri, 30 Sep 2016 16:42:57 +0000 (+0100) Subject: JAL-2210 CrossRef.findInDataset should search for presence of SequenceI in dataset... X-Git-Tag: Release_2_10_0~20^2~22 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=79e9deb92f86fe2df40db97b57587663203a6fdd;p=jalview.git JAL-2210 CrossRef.findInDataset should search for presence of SequenceI in dataset before anything more fancy or fuzzy. --- diff --git a/src/jalview/analysis/CrossRef.java b/src/jalview/analysis/CrossRef.java index 1295b46..a729334 100644 --- a/src/jalview/analysis/CrossRef.java +++ b/src/jalview/analysis/CrossRef.java @@ -618,6 +618,12 @@ public class CrossRef String name2 = xref.getSource() + "|" + name; SequenceI dss = mapsTo.getDatasetSequence() == null ? mapsTo : mapsTo .getDatasetSequence(); + // first check ds if ds is directly referenced + if (dataset.findIndex(dss) > -1) + { + return dss; + } + ; for (SequenceI seq : dataset.getSequences()) { /*