From: Jim Procter Date: Tue, 16 Oct 2018 16:28:02 +0000 (+0100) Subject: JAL-3127 always look up sequence ID colour from view when colouring by Sequence ID X-Git-Tag: Release_2_11_0~17^2~46^2~10 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=4cb58ab40ed4521e8ac732665098a6c57ad43896;p=jalview.git JAL-3127 always look up sequence ID colour from view when colouring by Sequence ID --- diff --git a/src/jalview/schemes/IdColourScheme.java b/src/jalview/schemes/IdColourScheme.java index a96ac0f..cd26666 100644 --- a/src/jalview/schemes/IdColourScheme.java +++ b/src/jalview/schemes/IdColourScheme.java @@ -23,7 +23,6 @@ package jalview.schemes; import jalview.api.AlignViewportI; import jalview.datamodel.AnnotatedCollectionI; import jalview.datamodel.SequenceCollectionI; -import jalview.datamodel.SequenceGroup; import jalview.datamodel.SequenceI; import java.awt.Color; @@ -74,10 +73,12 @@ public class IdColourScheme implements ColourSchemeI public Color findColour(char symbol, int position, SequenceI seq, String consensusResidue, float pid) { + // rather than testing if coll is a sequence group, and if so looking at + // ((SequenceGroup)coll).idColour + // we always return the sequence ID colour, in case the user has customised + // the displayed Id colour by right-clicking an internal node in the tree. return (view == null) ? Color.WHITE - : ((coll instanceof SequenceGroup) - ? ((SequenceGroup) coll).idColour - : view.getSequenceColour(seq)); + : view.getSequenceColour(seq).darker(); } @Override