From: amwaterhouse Date: Wed, 7 Feb 2007 14:28:38 +0000 (+0000) Subject: Extend annotation if too short X-Git-Tag: Release_2_3~359 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ca26cdb914e0a8885bb0a3986750481bde71383a;p=jalview.git Extend annotation if too short --- diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index 0427ecb..0f6901d 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -167,6 +167,15 @@ public class AnnotationPanel extends JPanel implements MouseListener, AlignmentAnnotation[] aa = av.alignment.getAlignmentAnnotation(); Annotation[] anot = aa[activeRow].annotations; + if (anot.length < av.getColumnSelection().getMax()) + { + Annotation[] temp = new Annotation[av.getColumnSelection().getMax()+2 ]; + System.arraycopy(anot, 0, temp, 0, anot.length); + anot = temp; + aa[activeRow].annotations = anot; + } + + if (evt.getActionCommand().equals(REMOVE)) { for (int i = 0; i < av.getColumnSelection().size(); i++)