From 05c597c23a32c17b91f893139ee2707232df0fc5 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 3 Feb 2006 17:43:32 +0000 Subject: [PATCH] set index of new annotation --- src/jalview/gui/AnnotationLabels.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)) -- 1.7.10.2