JAL-819 fix broken initConsensus
[jalview.git] / src / jalview / viewmodel / AlignmentViewport.java
index 9de0b94..69cc645 100644 (file)
@@ -1993,7 +1993,9 @@ public abstract class AlignmentViewport
                           .getString("label.complement_consensus_descr"),
                   new Annotation[1], 0f, 100f,
                   AlignmentAnnotation.BAR_GRAPH);
-          initConsensus(complementConsensus);
+          complementConsensus.hasText = true;
+          complementConsensus.autoCalculated = true;
+          alignment.addAnnotation(complementConsensus);
           return true;
         }
       }
@@ -2007,21 +2009,9 @@ public abstract class AlignmentViewport
     consensus = new AlignmentAnnotation("Consensus",
             MessageManager.getString("label.consensus_descr"),
             new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH);
-    initConsensus(consensus);
-  }
-
-  private void initConsensus(AlignmentAnnotation aa)
-  {
-    consensus = new AlignmentAnnotation("Consensus",
-            MessageManager.getString("label.consensus_descr"),
-            new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH);
     consensus.hasText = true;
     consensus.autoCalculated = true;
-
-    if (showConsensus)
-    {
-      alignment.addAnnotation(consensus);
-    }
+    alignment.addAnnotation(consensus);
   }
 
   @Override