JAL-2588 Gap colour scheme now shown in overview
[jalview.git] / src / jalview / gui / SequenceRenderer.java
index 2a2a0cf..7a1e263 100755 (executable)
@@ -138,12 +138,20 @@ public class SequenceRenderer implements jalview.api.SequenceRenderer
    */
   void getBoxColour(ResidueShaderI shader, SequenceI seq, int i)
   {
-    if (shader != null)
+    if (shader.getColourScheme() != null)
     {
-      resBoxColour = shader.findColour(seq.getCharAt(i),
+      if (forOverview && Comparison.isGap(seq.getCharAt(i))
+              && !shader.getColourScheme().hasGapColour())
+      {
+        resBoxColour = Color.lightGray;
+      }
+      else
+      {
+        resBoxColour = shader.findColour(seq.getCharAt(i),
               i, seq);
+      }
     }
-    else if (forOverview && !Comparison.isGap(seq.getCharAt(i)))
+    else if (forOverview && Comparison.isGap(seq.getCharAt(i)))
     {
       resBoxColour = Color.lightGray;
     }