From: jprocter Date: Thu, 14 Jun 2012 10:20:49 +0000 (+0100) Subject: JAL-961 ensure we only add one instance of a worker to the registered list of workers... X-Git-Tag: Jalview_2_9~476 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=7f4ea25188b05b5a4a346b4c5136e3e50c8f0036;p=jalview.git JAL-961 ensure we only add one instance of a worker to the registered list of workers for an alignment. --- diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index f14ddd4..8c34f31 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -371,8 +371,8 @@ public abstract class AlignmentViewport implements AlignViewportI { return; } - if (!calculator - .startRegisteredWorkersOfClass(jalview.workers.ConservationThread.class)) + if (calculator + .getRegisteredWorkersOfClass(jalview.workers.ConservationThread.class)==null) { calculator.registerWorker(new jalview.workers.ConservationThread( this, ap)); @@ -389,7 +389,7 @@ public abstract class AlignmentViewport implements AlignViewportI { return; } - if (!calculator.startRegisteredWorkersOfClass(ConsensusThread.class)) + if (calculator.getRegisteredWorkersOfClass(ConsensusThread.class)==null) { calculator.registerWorker(new ConsensusThread(this, ap)); } @@ -409,8 +409,8 @@ public abstract class AlignmentViewport implements AlignViewportI { return; } - if (!calculator - .startRegisteredWorkersOfClass(StrucConsensusThread.class)) + if (calculator + .getRegisteredWorkersOfClass(StrucConsensusThread.class)==null) { calculator.registerWorker(new StrucConsensusThread(this, ap)); }