JAL-2236 include associated sequence id for annotation’s label in filter/select combobox
authorJim Procter <jprocter@issues.jalview.org>
Thu, 29 Sep 2016 10:58:24 +0000 (11:58 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Thu, 29 Sep 2016 10:58:24 +0000 (11:58 +0100)
src/jalview/appletgui/AnnotationRowFilter.java
src/jalview/gui/AnnotationRowFilter.java

index fc49de5..cd00fcf 100644 (file)
@@ -104,6 +104,16 @@ public abstract class AnnotationRowFilter extends Panel
         enableSeqAss = true;
       }
       String label = av.getAlignment().getAlignmentAnnotation()[i].label;
+      // add associated sequence ID if available
+      if (!isSeqAssociated
+              && av.getAlignment().getAlignmentAnnotation()[i].sequenceRef != null)
+      {
+        label = label
+                + "_"
+                + av.getAlignment().getAlignmentAnnotation()[i].sequenceRef
+                        .getName();
+      }
+      // make label unique
       if (!list.contains(label))
       {
         anmap[list.size()] = i;
index f0bea60..0a5e96c 100644 (file)
@@ -161,6 +161,16 @@ public abstract class AnnotationRowFilter extends JPanel
         enableSeqAss = true;
       }
       String label = av.getAlignment().getAlignmentAnnotation()[i].label;
+      // add associated sequence ID if available
+      if (!isSeqAssociated
+              && av.getAlignment().getAlignmentAnnotation()[i].sequenceRef != null)
+      {
+        label = label
+                + "_"
+                + av.getAlignment().getAlignmentAnnotation()[i].sequenceRef
+                        .getName();
+      }
+      // make label unique
       if (!list.contains(label))
       {
         anmap[list.size()] = i;