CurrentColour must not be accessed by multiple sequence renderers
[jalview.git] / src / jalview / schemes / ResidueColourScheme.java
index 64fd62e..bf83665 100755 (executable)
@@ -52,12 +52,6 @@ public class ResidueColourScheme implements ColourSchemeI
    /** DOCUMENT ME!! */\r
    int inc = 30;\r
 \r
-   /**\r
-    * The colour to be calculated, manipulated and returned\r
-    */\r
-   Color currentColour = null;\r
-\r
-\r
 \r
     /**\r
      * Creates a new ResidueColourScheme object.\r
@@ -90,7 +84,7 @@ public class ResidueColourScheme implements ColourSchemeI
 \r
    public Color findColour(String s, int j)\r
    {\r
-\r
+       Color currentColour;\r
        int index = ResidueProperties.aaIndex[s.charAt(0)];\r
 \r
        if ((threshold == 0) || aboveThreshold(ResidueProperties.aa[index], j))\r
@@ -103,7 +97,7 @@ public class ResidueColourScheme implements ColourSchemeI
        }\r
 \r
        if(conservationColouring)\r
-         applyConservation(j);\r
+         applyConservation(currentColour, j);\r
 \r
 \r
        return currentColour;\r
@@ -227,7 +221,7 @@ public class ResidueColourScheme implements ColourSchemeI
     * @return DOCUMENT ME!\r
     */\r
 \r
-   void applyConservation(int i)\r
+   void applyConservation(Color currentColour, int i)\r
    {\r
 \r
      if ((conservation[i] != '*') && (conservation[i] != '+'))\r