From: gmungoc Date: Tue, 29 Dec 2020 16:38:35 +0000 (+0000) Subject: JAL-3788 synchronize concurrent findColour() and alignmentChanged() X-Git-Tag: Release_2_11_2_0~34^2~28 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=c59ecdac585dfecc8e5ba1b0327d248b38befc9f;p=jalview.git JAL-3788 synchronize concurrent findColour() and alignmentChanged() --- diff --git a/src/jalview/schemes/ClustalxColourScheme.java b/src/jalview/schemes/ClustalxColourScheme.java index 19723ca..5a2d5dc 100755 --- a/src/jalview/schemes/ClustalxColourScheme.java +++ b/src/jalview/schemes/ClustalxColourScheme.java @@ -20,16 +20,16 @@ */ package jalview.schemes; +import java.awt.Color; +import java.util.List; +import java.util.Map; + import jalview.api.AlignViewportI; import jalview.datamodel.AnnotatedCollectionI; import jalview.datamodel.SequenceCollectionI; import jalview.datamodel.SequenceI; import jalview.util.Comparison; -import java.awt.Color; -import java.util.List; -import java.util.Map; - public class ClustalxColourScheme extends ResidueColourScheme { private static final int EIGHTY_FIVE = 85; @@ -95,7 +95,7 @@ public class ClustalxColourScheme extends ResidueColourScheme } @Override - public void alignmentChanged(AnnotatedCollectionI alignment, + public synchronized void alignmentChanged(AnnotatedCollectionI alignment, Map hiddenReps) { int maxWidth = alignment.getWidth(); @@ -278,7 +278,7 @@ public class ClustalxColourScheme extends ResidueColourScheme } @Override - protected Color findColour(char c, int j, SequenceI seq) + protected synchronized Color findColour(char c, int j, SequenceI seq) { // TODO why the test for includeGaps here? if (cons2.length <= j || Comparison.isGap(c)