JAL-1645 Version-Rel Version 2.9 Year-Rel 2015 Licensing glob
[jalview.git] / src / jalview / datamodel / HiddenSequences.java
index bfeafd6..09c1b78 100755 (executable)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
+ * Copyright (C) 2015 The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -272,17 +272,25 @@ public class HiddenSequences
         index++;
       }
     }
+    Alignment fAlignmt = new Alignment(seq);
+    fAlignmt.annotations = alignment.getAlignmentAnnotation();
+    fAlignmt.alignmentProperties = alignment.getProperties();
+    fAlignmt.groups = alignment.getGroups();
+    fAlignmt.hasRNAStructure = alignment.hasRNAStructure();
 
-    return new Alignment(seq);
+    return fAlignmt;
   }
 
   public boolean isHidden(SequenceI seq)
   {
-    for (int i = 0; i < hiddenSequences.length; i++)
+    if (hiddenSequences != null)
     {
-      if (hiddenSequences[i] != null && hiddenSequences[i] == seq)
+      for (int i = 0; i < hiddenSequences.length; i++)
       {
-        return true;
+        if (hiddenSequences[i] != null && hiddenSequences[i] == seq)
+        {
+          return true;
+        }
       }
     }