JAL-654 JAL-1264 sequence associated annotation is duplicated before transfer to...
authorJim Procter <j.procter@dundee.ac.uk>
Mon, 6 Oct 2014 11:26:22 +0000 (12:26 +0100)
committerJim Procter <j.procter@dundee.ac.uk>
Mon, 6 Oct 2014 11:26:22 +0000 (12:26 +0100)
src/jalview/datamodel/Sequence.java

index 9cc7d54..945a9d4 100755 (executable)
@@ -1007,14 +1007,13 @@ public class Sequence implements SequenceI
       datasetSequence.updatePDBIds();
       if (annotation != null)
       {
-        Vector<AlignmentAnnotation> _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);
         }
       }
     }