X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FRNAHelicesColour.java;h=9729a8347f2de9bc3a2e8c32ed7c5a2f070e7be7;hb=4d74e766d77156f71533564b32006a06df8f01bd;hp=74cc803d1f4dd910aa8ed181fc37063af26f0629;hpb=7fef0501bb64f11080bdb93ee0824416d84784cc;p=jalview.git diff --git a/src/jalview/schemes/RNAHelicesColour.java b/src/jalview/schemes/RNAHelicesColour.java index 74cc803..9729a83 100644 --- a/src/jalview/schemes/RNAHelicesColour.java +++ b/src/jalview/schemes/RNAHelicesColour.java @@ -40,7 +40,6 @@ import java.util.Map; public class RNAHelicesColour extends ResidueColourScheme { - /** * Maps sequence positions to the RNA helix they belong to. Key: position, * Value: helix TODO: Revise or drop in favour of annotation position numbers @@ -61,12 +60,14 @@ public class RNAHelicesColour extends ResidueColourScheme { super(ResidueProperties.nucleotideIndex); this.annotation = annotation; + ColourSchemeProperty.resetRnaHelicesShading(); refresh(); } public RNAHelicesColour(AnnotatedCollectionI alignment) { super(ResidueProperties.nucleotideIndex); + ColourSchemeProperty.resetRnaHelicesShading(); alignmentChanged(alignment, null); } @@ -90,6 +91,10 @@ public class RNAHelicesColour extends ResidueColourScheme // This loop will find the first rna structure annotation by which to colour // the sequences. AlignmentAnnotation[] annotations = alignment.getAlignmentAnnotation(); + if (annotations == null) + { + return; + } for (int i = 0; i < annotations.length; i++) {