X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FAnnotationColourGradient.java;h=8f0626f46164670d78103c24685d82869ed1c188;hb=e5440b9f56f5183796ab68d5d4b40cb3c349865d;hp=f619d071cfc9128647e96aae4b18f353e74d450c;hpb=50eb1f492f5c64b56594ee49be8183fab8a2f73b;p=jalview.git diff --git a/src/jalview/schemes/AnnotationColourGradient.java b/src/jalview/schemes/AnnotationColourGradient.java index f619d07..8f0626f 100755 --- a/src/jalview/schemes/AnnotationColourGradient.java +++ b/src/jalview/schemes/AnnotationColourGradient.java @@ -19,6 +19,7 @@ package jalview.schemes; import jalview.datamodel.AlignmentAnnotation; +import jalview.datamodel.AlignmentI; import jalview.datamodel.AnnotatedCollectionI; import jalview.datamodel.GraphLine; import jalview.datamodel.SequenceCollectionI; @@ -125,7 +126,6 @@ public class AnnotationColourGradient extends FollowerColourScheme public void alignmentChanged(AnnotatedCollectionI alignment, Map hiddenReps) { - // TODO Auto-generated method stub super.alignmentChanged(alignment, hiddenReps); if (seqAssociated && annotation.getCalcId() != null) @@ -138,7 +138,9 @@ public class AnnotationColourGradient extends FollowerColourScheme { seqannot = new IdentityHashMap(); } - for (AlignmentAnnotation alan : alignment.findAnnotation(annotation + // resolve the context containing all the annotation for the sequence + AnnotatedCollectionI alcontext = alignment instanceof AlignmentI ? alignment : alignment.getContext(); + for (AlignmentAnnotation alan : alcontext.findAnnotation(annotation .getCalcId())) { if (alan.sequenceRef != null