From 4cb58ab40ed4521e8ac732665098a6c57ad43896 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 16 Oct 2018 17:28:02 +0100 Subject: [PATCH] JAL-3127 always look up sequence ID colour from view when colouring by Sequence ID --- src/jalview/schemes/IdColourScheme.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 -- 1.7.10.2