From: jprocter Date: Tue, 28 Aug 2012 09:31:50 +0000 (+0100) Subject: JAL-1148 reinstate sequence references for annotation regardless of whether they... X-Git-Tag: Jalview_2_9~394 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=e4d3bc400c467cf2547a1c99e9c73ab19fddd015;p=jalview.git JAL-1148 reinstate sequence references for annotation regardless of whether they are autocalculated or not (patch not checked for regressions!) --- diff --git a/src/jalview/gui/Jalview2XML.java b/src/jalview/gui/Jalview2XML.java index ea5d5a7..6acd421 100644 --- a/src/jalview/gui/Jalview2XML.java +++ b/src/jalview/gui/Jalview2XML.java @@ -2306,24 +2306,20 @@ public class Jalview2XML jaa = new jalview.datamodel.AlignmentAnnotation(an[i].getLabel(), an[i].getDescription(), anot); } - if (autoForView) + // register new annotation + if (an[i].getId() != null) { - // register new annotation - if (an[i].getId() != null) - { - annotationIds.put(an[i].getId(), jaa); - jaa.annotationId = an[i].getId(); - } - // recover sequence association - if (an[i].getSequenceRef() != null) + annotationIds.put(an[i].getId(), jaa); + jaa.annotationId = an[i].getId(); + } + // recover sequence association + if (an[i].getSequenceRef() != null) + { + if (al.findName(an[i].getSequenceRef()) != null) { - if (al.findName(an[i].getSequenceRef()) != null) - { - jaa.createSequenceMapping( - al.findName(an[i].getSequenceRef()), 1, true); - al.findName(an[i].getSequenceRef()).addAlignmentAnnotation( - jaa); - } + jaa.createSequenceMapping(al.findName(an[i].getSequenceRef()), + 1, true); + al.findName(an[i].getSequenceRef()).addAlignmentAnnotation(jaa); } } // and make a note of any group association