JAL-3442 colour caching for Overview resize
[jalview.git] / src / jalview / renderer / OverviewResColourFinder.java
index 7207dea..740b56c 100644 (file)
@@ -124,12 +124,19 @@ public class OverviewResColourFinder extends ResidueColourFinder
           SequenceGroup[] allGroups, final SequenceI seq, int i,
           FeatureColourFinder finder)
   {
+    int c = seq.getColor(i);
+    if (c != 0)
+    {
+      return c;
+    }
+
     int col = getResidueBoxColourInt(showBoxes, shader, allGroups, seq, i);
 
     // if there's a FeatureColourFinder we might override the residue colour
     // here with feature colouring
     col = finder == null || finder.noFeaturesDisplayed() ? col
             : finder.findFeatureColourInt(col, seq, i);
+    seq.setColor(i, col);
     return col;
   }