From: jprocter Date: Tue, 2 Oct 2007 16:01:39 +0000 (+0000) Subject: convenience constructor for duplicating an annotation and editing it for hidden columns X-Git-Tag: Release_2_4~254 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=3c900dfc85fe55b1dcefd318acee9a34f701b8bd;p=jalview.git convenience constructor for duplicating an annotation and editing it for hidden columns --- diff --git a/src/jalview/datamodel/AlignmentAnnotation.java b/src/jalview/datamodel/AlignmentAnnotation.java index 87c113f..b59417a 100755 --- a/src/jalview/datamodel/AlignmentAnnotation.java +++ b/src/jalview/datamodel/AlignmentAnnotation.java @@ -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) {