patch for JAL-795 - use base secondary structure colour if no colour defined on annot...
[jalview.git] / src / jalview / schemes / AnnotationColourGradient.java
index e975884..3bca94b 100755 (executable)
@@ -244,7 +244,10 @@ public class AnnotationColourGradient extends FollowerColourScheme
         {
           if (predefinedColours)
           {
-            return currentColour;
+            return (annotation.annotations[j].secondaryStructure == 'H' ? jalview.renderer.AnnotationRenderer.HELIX_COLOUR
+                    : annotation.annotations[j].secondaryStructure == 'E' ? jalview.renderer.AnnotationRenderer.SHEET_COLOUR
+                            : annotation.annotations[j].secondaryStructure != ' ' ? jalview.renderer.AnnotationRenderer.STEM_COLOUR
+                                    : currentColour);
           }
         }
         if (aboveAnnotationThreshold == NO_THRESHOLD