Merge branch 'develop' into features/JAL-1956_featureStyles
[jalview.git] / src / jalview / schemes / FeatureColour.java
index bd58273..213868b 100644 (file)
@@ -111,10 +111,10 @@ public class FeatureColour implements FeatureColourI
     }
 
     /*
-     * autoScaled == true: colours range over actual score range; autoScaled ==
-     * false ('abso'): colours range over min/max range
+     * autoScaled == true: colours range over actual score range
+     * autoScaled == false ('abso'): colours range over min/max range
      */
-    boolean autoScaled = false;
+    boolean autoScaled = true;
     String tok = null, minval, maxval;
     if (mincol != null)
     {
@@ -138,15 +138,15 @@ public class FeatureColour implements FeatureColourI
       }
       tok = gcol.nextToken();
       gcol.nextToken(); // skip next '|'
-      if (tok.toLowerCase().indexOf("abso") != 0)
+      if (tok.toLowerCase().startsWith("abso"))
       {
-        minval = tok;
-        autoScaled = true;
+        minval = gcol.nextToken();
+        gcol.nextToken(); // skip next '|'
+        autoScaled = false;
       }
       else
       {
-        minval = gcol.nextToken();
-        gcol.nextToken(); // skip next '|'
+        minval = tok;
       }
       maxval = gcol.nextToken();
       if (gcol.hasMoreTokens())
@@ -359,8 +359,7 @@ public class FeatureColour implements FeatureColourI
    * Sets the 'graduated colour' flag. If true, also sets 'colour by label' to
    * false.
    */
-  @Override
-  public void setGraduatedColour(boolean b)
+  void setGraduatedColour(boolean b)
   {
     graduatedColour = b;
     if (b)
@@ -643,7 +642,7 @@ public class FeatureColour implements FeatureColourI
       {
         sb.append(Format.getHexString(getMinColour())).append(BAR);
         sb.append(Format.getHexString(getMaxColour())).append(BAR);
-        if (isAutoScaled())
+        if (!isAutoScaled())
         {
           sb.append("abso").append(BAR);
         }