From bdd843c2e0bc3a9dac00f8db67601d388e800879 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Mon, 6 Oct 2014 12:26:22 +0100 Subject: [PATCH] JAL-654 JAL-1264 sequence associated annotation is duplicated before transfer to dataset sequence rather than simply relocated to preserve alignment references --- src/jalview/datamodel/Sequence.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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); } } } -- 1.7.10.2