JAL-1153 ensure _linecolour is copied in copy constructor
authorjprocter <jprocter@compbio.dundee.ac.uk>
Mon, 3 Sep 2012 14:01:09 +0000 (15:01 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Mon, 3 Sep 2012 14:01:09 +0000 (15:01 +0100)
src/jalview/datamodel/AlignmentAnnotation.java

index 6212d4d..82e8ae4 100755 (executable)
@@ -557,7 +557,14 @@ public class AlignmentAnnotation
       this.annotations = new Annotation[ann.length];
       for (int i = 0; i < ann.length; i++)
       {
-        annotations[i] = new Annotation(ann[i]);
+        if (ann[i]!=null)
+        {
+          annotations[i] = new Annotation(ann[i]);
+          if (_linecolour!=null)
+          {
+            _linecolour = annotations[i].colour;
+          }
+        }
       }
       ;
       if (annotation.sequenceRef != null)