From: gmungoc Date: Fri, 22 Nov 2019 16:18:09 +0000 (+0000) Subject: JAL-819 fix broken initConsensus X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=79362a91b9005d5391ee9f1621cb7c09f4c5b179;p=jalview.git JAL-819 fix broken initConsensus --- diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index 9de0b94..69cc645 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -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