JAL-1592 JAL-1489 avoid invalid RNA structure and distinguish alignment associated...
authorJim Procter <jprocter@dundee.ac.uk>
Fri, 21 Nov 2014 08:54:11 +0000 (08:54 +0000)
committerJim Procter <jprocter@dundee.ac.uk>
Fri, 21 Nov 2014 08:54:11 +0000 (08:54 +0000)
src/jalview/gui/PopupMenu.java

index 1c7be46..36811c7 100644 (file)
@@ -374,10 +374,10 @@ public class PopupMenu extends JPopupMenu
                 .getAlignmentAnnotation();
         for (int i = 0; i < aa.length; i++)
         {
-          if (aa[i].getRNAStruc() != null)
+          if (aa[i].isValidStruc() && aa[i].sequenceRef == null)
           {
             final String rnastruc = aa[i].getRNAStruc();
-            final String structureLine = aa[i].label;
+            final String structureLine = aa[i].label + " (alignment)";
             menuItem = new JMenuItem();
             menuItem.setText(MessageManager.formatMessage(
                     "label.2d_rna_structure_line", new String[]
@@ -414,7 +414,7 @@ public class PopupMenu extends JPopupMenu
           AlignmentAnnotation seqAnno[] = seq.getAnnotation();
           for (int i = 0; i < seqAnno.length; i++)
           {
-            if (seqAnno[i].getRNAStruc() != null)
+            if (seqAnno[i].isValidStruc())
             {
               final String rnastruc = seqAnno[i].getRNAStruc();