convenience constructor for duplicating an annotation and editing it for hidden columns
[jalview.git] / src / jalview / datamodel / AlignmentAnnotation.java
index 87c113f..b59417a 100755 (executable)
@@ -656,6 +656,21 @@ Loading...
     this(label, description, null);
     setScore(score);
   }
+  /**
+   * copy constructor with edit based on the hidden columns marked in colSel
+   * @param alignmentAnnotation
+   * @param colSel
+   */
+  public AlignmentAnnotation(AlignmentAnnotation alignmentAnnotation,
+          ColumnSelection colSel)
+  {
+    this(alignmentAnnotation);
+    if (annotations==null)
+    {
+      return;
+    }
+    colSel.makeVisibleAnnotation(this);
+  }
 
   public void setPadGaps(boolean padgaps, char gapchar)
   {