X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fworkers%2FConsensusThread.java;h=1a5aaa4d54472f5e7aa156d89553a5895d9df06a;hb=caa5930cf71ef14a4af891f2c17aa4a6e0f72bcf;hp=284f1a164b28c03ca351b6214fe2cd9704cc43d3;hpb=4762b29420ed4df01b55a8afe5ab05467aaf41a9;p=jalview.git diff --git a/src/jalview/workers/ConsensusThread.java b/src/jalview/workers/ConsensusThread.java index 284f1a1..1a5aaa4 100644 --- a/src/jalview/workers/ConsensusThread.java +++ b/src/jalview/workers/ConsensusThread.java @@ -46,7 +46,7 @@ public class ConsensusThread extends AlignCalcWorker return; } calcMan.notifyStart(this); - long started = System.currentTimeMillis(); + // long started = System.currentTimeMillis(); try { AlignmentAnnotation consensus = getConsensusAnnotation(); @@ -58,12 +58,13 @@ public class ConsensusThread extends AlignCalcWorker } while (!calcMan.notifyWorking(this)) { - // System.err.println("Thread (Consensus"+Thread.currentThread().getName()+") Waiting around."); + // System.err.println("Thread + // (Consensus"+Thread.currentThread().getName()+") Waiting around."); try { if (ap != null) { - ap.paintAlignment(false); + ap.paintAlignment(false, false); } Thread.sleep(200); } catch (Exception ex) @@ -92,7 +93,7 @@ public class ConsensusThread extends AlignCalcWorker if (ap != null) { - ap.paintAlignment(true); + ap.paintAlignment(true, true); } } catch (OutOfMemoryError error) { @@ -117,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) {