From e4d3bc400c467cf2547a1c99e9c73ab19fddd015 Mon Sep 17 00:00:00 2001 From: jprocter Date: Tue, 28 Aug 2012 10:31:50 +0100 Subject: [PATCH] JAL-1148 reinstate sequence references for annotation regardless of whether they are autocalculated or not (patch not checked for regressions!) --- src/jalview/gui/Jalview2XML.java | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) 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 -- 1.7.10.2