From: Jim Procter Date: Sat, 5 Sep 2015 17:40:05 +0000 (+0100) Subject: JAL-1871 choose a new RNA Helices palette when annotation colouring is updated X-Git-Tag: Release_2_10_0~488 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8904428112b78efda2ecf28e9151b38a6f6be168;p=jalview.git JAL-1871 choose a new RNA Helices palette when annotation colouring is updated --- diff --git a/src/jalview/schemes/AnnotationColourGradient.java b/src/jalview/schemes/AnnotationColourGradient.java index 121d6ca..133dd36 100755 --- a/src/jalview/schemes/AnnotationColourGradient.java +++ b/src/jalview/schemes/AnnotationColourGradient.java @@ -114,6 +114,7 @@ public class AnnotationColourGradient extends FollowerColourScheme bb = 0; noGradient = true; + checkLimits(); } /** @@ -140,10 +141,17 @@ public class AnnotationColourGradient extends FollowerColourScheme bb = maxColour.getBlue() - b1; noGradient = false; + checkLimits(); + } + + private void checkLimits() + { aamax = annotation.graphMax; aamin = annotation.graphMin; if (annotation.isRNA()) { + // reset colour palette + ColourSchemeProperty.resetRnaHelicesShading(); ColourSchemeProperty.initRnaHelicesShading(1 + (int) aamax); } }