From: Jim Procter Date: Mon, 6 Oct 2014 11:26:22 +0000 (+0100) Subject: JAL-654 JAL-1264 sequence associated annotation is duplicated before transfer to... X-Git-Tag: Jalview_2_9~174^2~2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=bdd843c2e0bc3a9dac00f8db67601d388e800879;p=jalview.git JAL-654 JAL-1264 sequence associated annotation is duplicated before transfer to dataset sequence rather than simply relocated to preserve alignment references --- diff --git a/src/jalview/datamodel/Sequence.java b/src/jalview/datamodel/Sequence.java index 9cc7d54..945a9d4 100755 --- a/src/jalview/datamodel/Sequence.java +++ b/src/jalview/datamodel/Sequence.java @@ -1007,14 +1007,13 @@ public class Sequence implements SequenceI datasetSequence.updatePDBIds(); if (annotation != null) { - Vector _annot = annotation; - annotation = null; - for (AlignmentAnnotation aa : _annot) + for (AlignmentAnnotation aa : annotation) { - aa.sequenceRef = datasetSequence; - aa.adjustForAlignment(); // uses annotation's own record of + AlignmentAnnotation _aa = new AlignmentAnnotation(aa); + _aa.sequenceRef = datasetSequence; + _aa.adjustForAlignment(); // uses annotation's own record of // sequence-column mapping - datasetSequence.addAlignmentAnnotation(aa); + datasetSequence.addAlignmentAnnotation(_aa); } } }