JAL-2371 slight simplification of findColour overrides
[jalview.git] / src / jalview / schemes / PIDColourScheme.java
index a6301fa..6ca1393 100755 (executable)
@@ -57,7 +57,7 @@ public class PIDColourScheme extends ResidueColourScheme
       c -= ('a' - 'A');
     }
 
-    if (consensusResidue == null)
+    if (consensusResidue == null || Comparison.isGap(c))
     {
       return Color.white;
     }
@@ -71,15 +71,12 @@ public class PIDColourScheme extends ResidueColourScheme
             String.valueOf(c));
     if (matchesConsensus)
     {
-      if (!Comparison.isGap(c))
+      for (int i = 0; i < thresholds.length; i++)
       {
-        for (int i = 0; i < thresholds.length; i++)
+        if (pid > thresholds[i])
         {
-          if (pid > thresholds[i])
-          {
-            colour = pidColours[i];
-            break;
-          }
+          colour = pidColours[i];
+          break;
         }
       }
     }