From: jprocter Date: Fri, 9 Jan 2009 15:11:33 +0000 (+0000) Subject: hack to completely disable calculation of consensus and conservation if autocalculate... X-Git-Tag: Release_2_5~353 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=94fdc0bf7dfe9639a0eb8c53313f873b66f98eba;p=jalview.git hack to completely disable calculation of consensus and conservation if autocalculate is not enabled --- diff --git a/src/jalview/gui/AlignViewport.java b/src/jalview/gui/AlignViewport.java index 587ce55..0536f8d 100755 --- a/src/jalview/gui/AlignViewport.java +++ b/src/jalview/gui/AlignViewport.java @@ -342,7 +342,7 @@ public class AlignViewport implements SelectionSource alignment.addAnnotation(quality); } } - + // TODO: add menu option action that nulls or creates consensus object depending on if the user wants to see the annotation or not in a specific alignment consensus = new AlignmentAnnotation("Consensus", "PID", new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH); consensus.hasText = true; @@ -560,7 +560,8 @@ public class AlignViewport implements SelectionSource */ public void updateConservation(final AlignmentPanel ap) { - if (alignment.isNucleotide() || conservation == null) + // see note in mantis : issue number 8585 + if (alignment.isNucleotide() || conservation == null || !autoCalculateConsensus) { return; } @@ -574,6 +575,11 @@ public class AlignViewport implements SelectionSource */ public void updateConsensus(final AlignmentPanel ap) { + // see note in mantis : issue number 8585 + if (consensus == null || !autoCalculateConsensus) + { + return; + } consensusThread = new ConsensusThread(ap); consensusThread.start(); } @@ -1883,9 +1889,12 @@ public class AlignViewport implements SelectionSource } if (hconsensus != null && autoCalculateConsensus) { - updateConsensus(ap); updateConservation(ap); } + if (autoCalculateConsensus) + { + updateConsensus(ap); + } // Reset endRes of groups if beyond alignment width int alWidth = alignment.getWidth();