Fix for JAL-4126 - don’t automatically create a threshold line when no threshold...
authorJames Procter <j.procter@dundee.ac.uk>
Fri, 10 Feb 2023 16:26:37 +0000 (16:26 +0000)
committerJames Procter <j.procter@dundee.ac.uk>
Fri, 10 Feb 2023 16:26:37 +0000 (16:26 +0000)
src/jalview/project/Jalview2XML.java

index c8f9be6..c900c06 100644 (file)
@@ -5094,7 +5094,10 @@ public class Jalview2XML
               + annotationId);
       return null;
     }
-    if (matchedAnnotation.getThreshold() == null)
+    // belt-and-braces create a threshold line if the 
+    // colourscheme needs one but the matchedAnnotation doesn't have one
+    if (safeInt(viewAnnColour.getAboveThreshold()) != 0
+            && matchedAnnotation.getThreshold() == null)
     {
       matchedAnnotation.setThreshold(
               new GraphLine(safeFloat(viewAnnColour.getThreshold()),