X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FAnnotationLabels.java;h=c0b80220630010b800ed272611a32a0d6ecbaf46;hb=4f90c01f2b85f6c042ddba89e4dacb8cc2f86881;hp=0faa8b08c2d787a9be188ff653839e2b49c28bbf;hpb=6de402db90987d3645f3429d9073c13678d8e980;p=jalview.git diff --git a/src/jalview/gui/AnnotationLabels.java b/src/jalview/gui/AnnotationLabels.java index 0faa8b0..c0b8022 100755 --- a/src/jalview/gui/AnnotationLabels.java +++ b/src/jalview/gui/AnnotationLabels.java @@ -403,20 +403,19 @@ public class AnnotationLabels AlignmentAnnotation[] aa = ap.av.alignment.getAlignmentAnnotation(); + JPopupMenu pop = new JPopupMenu("Annotations"); + JMenuItem item = new JMenuItem(ADDNEW); + item.addActionListener(this); + if ( (aa == null) || (aa.length == 0)) { - JPopupMenu pop = new JPopupMenu("Annotations"); - JMenuItem item = new JMenuItem(ADDNEW); + item = new JMenuItem(SHOWALL); item.addActionListener(this); pop.add(item); pop.show(this, evt.getX(), evt.getY()); - return; } - JPopupMenu pop = new JPopupMenu("Annotations"); - JMenuItem item = new JMenuItem(ADDNEW); - item.addActionListener(this); pop.add(item); item = new JMenuItem(EDITNAME); item.addActionListener(this); @@ -434,7 +433,7 @@ public class AnnotationLabels item.addActionListener(this); pop.add(item); // annotation object should be typed - if (aa[selectedRow] == ap.av.consensus) + if (selectedRow