JAL-2110 add 'products' parameter to filter results in madeCdsAlignment
[jalview.git] / src / jalview / gui / AlignFrame.java
index c5fb11f..64bdf44 100644 (file)
@@ -4768,7 +4768,7 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
           if (dna)
           {
             copyAlignment = AlignmentUtils.makeCdsAlignment(
-                    sequenceSelection, dataset);
+                    sequenceSelection, dataset, xrefsAlignment);
             if (copyAlignment.getHeight() == 0)
             {
               System.err.println("Failed to make CDS alignment");
@@ -5950,8 +5950,13 @@ public class AlignFrame extends GAlignFrame implements DropTargetListener,
   protected void setAnnotationsVisibility(boolean visible,
           boolean forSequences, boolean forAlignment)
   {
-    for (AlignmentAnnotation aa : alignPanel.getAlignment()
-            .getAlignmentAnnotation())
+    AlignmentAnnotation[] anns = alignPanel.getAlignment()
+            .getAlignmentAnnotation();
+    if (anns == null)
+    {
+      return;
+    }
+    for (AlignmentAnnotation aa : anns)
     {
       /*
        * don't display non-positional annotations on an alignment