X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fworkers%2FConsensusThread.java;h=8882b5399057a279af967ee7858eeae5117a2ea7;hb=c24ec44edbedba55005373c43bf712c047b56faa;hp=4242b2a47aa24cd2ed1211cbc75211a80b59184c;hpb=3d0101179759ef157b088ea135423cd909512d9f;p=jalview.git diff --git a/src/jalview/workers/ConsensusThread.java b/src/jalview/workers/ConsensusThread.java index 4242b2a..8882b53 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,13 +58,13 @@ public class ConsensusThread extends AlignCalcWorker } while (!calcMan.notifyWorking(this)) { - // System.err.println("Thread + // jalview.bin.Console.errPrintln("Thread // (Consensus"+Thread.currentThread().getName()+") Waiting around."); try { 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) {