From 862f76c4b933814aba67bc132c586811680d3ef5 Mon Sep 17 00:00:00 2001 From: "j.procter@dundee.ac.uk" Date: Fri, 18 Jul 2014 13:32:23 +0100 Subject: [PATCH] JAL-795 take colour from annotation if colour is present --- src/jalview/schemes/AnnotationColourGradient.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/jalview/schemes/AnnotationColourGradient.java b/src/jalview/schemes/AnnotationColourGradient.java index f467cb8..e975884 100755 --- a/src/jalview/schemes/AnnotationColourGradient.java +++ b/src/jalview/schemes/AnnotationColourGradient.java @@ -233,14 +233,20 @@ public class AnnotationColourGradient extends FollowerColourScheme && !jalview.util.Comparison.isGap(c)) { - if (predefinedColours) + if (annotation.annotations[j].colour != null) { - if (annotation.annotations[j].colour != null) + if (predefinedColours || annotation.hasIcons) + { return annotation.annotations[j].colour; - else + } + } + else + { + if (predefinedColours) + { return currentColour; + } } - if (aboveAnnotationThreshold == NO_THRESHOLD || (annotationThreshold != null && aboveAnnotationThreshold == ABOVE_THRESHOLD && annotation.annotations[j].value >= annotationThreshold.value) -- 1.7.10.2