From: Mateusz Warowny Date: Wed, 12 Jul 2023 13:49:12 +0000 (+0200) Subject: JAL-4199 Restore deletable test when removing workers X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=788adb3977209d98934788e18f330ec1549b596b;p=jalview.git JAL-4199 Restore deletable test when removing workers --- diff --git a/src/jalview/workers/AlignCalcManager2.java b/src/jalview/workers/AlignCalcManager2.java index 582c84f..39111ae 100644 --- a/src/jalview/workers/AlignCalcManager2.java +++ b/src/jalview/workers/AlignCalcManager2.java @@ -302,7 +302,10 @@ public class AlignCalcManager2 implements AlignCalcManagerI2 @Override public void removeWorker(AlignCalcWorkerI worker) { - registered.remove(worker); + if (worker.isDeletable()) + { + registered.remove(worker); + } } @Override diff --git a/src/jalview/ws2/actions/annotation/AlignCalcWorkerAdapter.java b/src/jalview/ws2/actions/annotation/AlignCalcWorkerAdapter.java index cf693bc..0905ea2 100644 --- a/src/jalview/ws2/actions/annotation/AlignCalcWorkerAdapter.java +++ b/src/jalview/ws2/actions/annotation/AlignCalcWorkerAdapter.java @@ -148,6 +148,12 @@ public class AlignCalcWorkerAdapter extends AlignCalcWorker implements PollableA } @Override + public boolean isDeletable() + { + return true; + } + + @Override public String toString() { return "AlignCalcWorkerAdapter-" + calcNumber + " for " + getCalcName();