From: j.procter@dundee.ac.uk Date: Fri, 18 Jul 2014 12:32:23 +0000 (+0100) Subject: JAL-795 take colour from annotation if colour is present X-Git-Tag: Jalview_2_9~179^2~6 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=862f76c4b933814aba67bc132c586811680d3ef5 JAL-795 take colour from annotation if colour is present --- 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)