JAL-2599 fixed information annotation buttons not working
authorTZVanaalten <TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Fri, 4 Aug 2017 11:29:11 +0000 (12:29 +0100)
committerTZVanaalten <TZVanaalten@LS30916.ad.lifesci.dundee.ac.uk>
Fri, 4 Aug 2017 14:08:03 +0000 (15:08 +0100)
src/jalview/gui/AnnotationLabels.java
src/jalview/renderer/AnnotationRenderer.java

index 090a400..367baf1 100755 (executable)
@@ -423,7 +423,7 @@ public class AnnotationLabels extends JPanel implements MouseListener,
     {
       final String label = aa[selectedRow].label;
       if (!(aa[selectedRow].autoCalculated)
-              && !(label.indexOf("Information") > -1))
+              && !(label.indexOf("_HMM") > -1))
       {
         if (aa[selectedRow].graph == AlignmentAnnotation.NO_GRAPH)
         {
@@ -605,7 +605,7 @@ public class AnnotationLabels extends JPanel implements MouseListener,
         consclipbrd.addActionListener(this);
         pop.add(consclipbrd);
       }
-      else if (label.indexOf("Information") > -1) // TODO create labels
+      else if (label.indexOf("_HMM") > -1) // TODO create labels
                                                           // in message resource
                                                           // for these
       {
index 9aec02c..9b8588e 100644 (file)
@@ -364,7 +364,7 @@ public class AnnotationRenderer
     // properties/rendering attributes as a global 'alignment group' which holds
     // all vis settings for the alignment as a whole rather than a subset
     //
-    if (aa.label.startsWith("Information"))
+    if (aa.label.contains("_HMM"))
     {
       HiddenMarkovModel hmm = aa.sequenceRef.getHMM();
       return AAFrequency.extractHMMProfile(hmm, column,
@@ -478,8 +478,6 @@ hconsensus.get(column),
     boolean scaleColLabel = false;
     final AlignmentAnnotation consensusAnnot = av
             .getAlignmentConsensusAnnotation();
-    final AlignmentAnnotation informationAnnot = av
-            .getAlignmentInformationAnnotation();
     final AlignmentAnnotation structConsensusAnnot = av
             .getAlignmentStrucConsensusAnnotation();
     final AlignmentAnnotation complementConsensusAnnot = av
@@ -517,7 +515,7 @@ hconsensus.get(column),
           renderProfile = av_renderProfile;
           normaliseProfile = av_normaliseProfile;
         }
-        else if (row == informationAnnot)
+        else if (row.label.contains("_HMM"))
         {
           renderHistogram = av_renderInformationHistogram;
           renderProfile = av_renderHMMProfile;