X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fschemes%2FAnnotationColourGradient.java;h=c6daa662a2ea321f69e19d35b754819c4e4928a8;hb=a8f483d04205bb8273ee311c12968b7e86d205fa;hp=f619d071cfc9128647e96aae4b18f353e74d450c;hpb=50eb1f492f5c64b56594ee49be8183fab8a2f73b;p=jalview.git diff --git a/src/jalview/schemes/AnnotationColourGradient.java b/src/jalview/schemes/AnnotationColourGradient.java index f619d07..c6daa66 100755 --- a/src/jalview/schemes/AnnotationColourGradient.java +++ b/src/jalview/schemes/AnnotationColourGradient.java @@ -1,5 +1,5 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.0b1) + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2) * Copyright (C) 2014 The Jalview Authors * * This file is part of Jalview. @@ -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