From: amwaterhouse Date: Fri, 3 Feb 2006 17:43:32 +0000 (+0000) Subject: set index of new annotation X-Git-Tag: Root_VamJalview_2_07b+~178 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=05c597c23a32c17b91f893139ee2707232df0fc5;p=jalview.git set index of new annotation --- diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index 7418e48..1068980 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -128,10 +128,12 @@ public class AnnotationLabels extends JPanel implements MouseListener, label = ""; } - ap.av.alignment.addAnnotation(new AlignmentAnnotation(label, + AlignmentAnnotation newAnnotation = new AlignmentAnnotation(label, "New description", - new Annotation[ap.av.alignment.getWidth()])); + new Annotation[ap.av.alignment.getWidth()]); + ap.av.alignment.addAnnotation(newAnnotation); + ap.av.alignment.setAnnotationIndex(newAnnotation, 0); dif = aa[aa.length - 1].height; } else if (evt.getActionCommand().equals(HIDE))