X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fworkers%2FConsensusThread.java;h=c98c27d155f0585d33cb996219cd32634e981158;hb=17de9804e86a60c532039b6630d77480f903e9e0;hp=4242b2a47aa24cd2ed1211cbc75211a80b59184c;hpb=f4766a7bbcfae845fc95923b01fa14ff83d589ff;p=jalview.git diff --git a/src/jalview/workers/ConsensusThread.java b/src/jalview/workers/ConsensusThread.java index 4242b2a..c98c27d 100644 --- a/src/jalview/workers/ConsensusThread.java +++ b/src/jalview/workers/ConsensusThread.java @@ -64,7 +64,7 @@ public class ConsensusThread extends AlignCalcWorker { if (ap != null) { - ap.paintAlignment(false); + ap.paintAlignment(false, false); } Thread.sleep(200); } catch (Exception ex) @@ -93,7 +93,7 @@ public class ConsensusThread extends AlignCalcWorker if (ap != null) { - ap.paintAlignment(true); + ap.paintAlignment(true, true); } } catch (OutOfMemoryError error) { @@ -118,7 +118,10 @@ public class ConsensusThread extends AlignCalcWorker protected void eraseConsensus(int aWidth) { AlignmentAnnotation consensus = getConsensusAnnotation(); - consensus.annotations = new Annotation[aWidth]; + if (consensus != null) + { + consensus.annotations = new Annotation[aWidth]; + } AlignmentAnnotation gap = getGapAnnotation(); if (gap != null) { @@ -219,7 +222,6 @@ public class ConsensusThread extends AlignCalcWorker protected void deriveConsensus(AlignmentAnnotation consensusAnnotation, ProfilesI hconsensus) { - long nseq = getSequences().length; AAFrequency.completeConsensus(consensusAnnotation, hconsensus, hconsensus.getStartColumn(), hconsensus.getEndColumn() + 1,