JAL-3612 use _last_ drawn colour per feature type in Overview
[jalview.git] / src / jalview / renderer / seqfeatures / FeatureRenderer.java
index aa3328b..fe80e63 100644 (file)
@@ -539,10 +539,15 @@ public class FeatureRenderer extends FeatureRendererModel
         continue;
       }
 
+      /*
+       * find features of this type, and the colour of the _last_ one
+       * (the one that would be drawn on top) that has a colour
+       */
       List<SequenceFeature> overlaps = seq.findFeatures(column, column,
               type);
-      for (SequenceFeature sequenceFeature : overlaps)
+      for (int i = overlaps.size() - 1 ; i >= 0 ; i--)
       {
+        SequenceFeature sequenceFeature = overlaps.get(i);
         if (!featureGroupNotShown(sequenceFeature))
         {
           Color col = getColour(sequenceFeature);