X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FAnnotationColourGradient.java;h=b31eabc80295e11d7c7d6e32a7f80b3c51df2e40;hb=b57a02c25e335d033c97f8a6bacd6b54f62bd2b6;hp=78e850bacd01ba858e7357ab074005c8d8baa0a2;hpb=1cc81e06ac2faa5ee4b8879e9fa019956e34259f;p=jalview.git diff --git a/src/jalview/schemes/AnnotationColourGradient.java b/src/jalview/schemes/AnnotationColourGradient.java index 78e850b..b31eabc 100755 --- a/src/jalview/schemes/AnnotationColourGradient.java +++ b/src/jalview/schemes/AnnotationColourGradient.java @@ -108,13 +108,16 @@ public class AnnotationColourGradient extends ResidueColourScheme { // TODO Auto-generated method stub super.alignmentChanged(alignment, hiddenReps); - + if (seqAssociated && annotation.getCalcId() != null) { - if (seqannot!=null) { + if (seqannot != null) + { seqannot.clear(); - } else { - seqannot=new IdentityHashMap(); + } + else + { + seqannot = new IdentityHashMap(); } for (AlignmentAnnotation alan : alignment.findAnnotation(annotation .getCalcId())) @@ -193,8 +196,9 @@ public class AnnotationColourGradient extends ResidueColourScheme public Color findColour(char c, int j, SequenceI seq) { Color currentColour = Color.white; - AlignmentAnnotation annotation=(seqAssociated ? seqannot.get(seq):this.annotation); - if (annotation==null) + AlignmentAnnotation annotation = (seqAssociated ? seqannot.get(seq) + : this.annotation); + if (annotation == null) { return currentColour; }