Threshold single element
[jalview.git] / src / jalview / gui / AnnotationColourChooser.java
index 06040a6..25eee10 100755 (executable)
@@ -221,9 +221,9 @@ public class AnnotationColourChooser
     else if(threshold.getSelectedItem().equals("Below Threshold"))\r
       aboveThreshold = AnnotationColourGradient.BELOW_THRESHOLD;\r
 \r
-    if(aboveThreshold!=AnnotationColourGradient.NO_THRESHOLD && aa.graphLines==null)\r
+    if(aboveThreshold!=AnnotationColourGradient.NO_THRESHOLD && aa.threshold==null)\r
    {\r
-     aa.addGraphLine(new jalview.datamodel.GraphLine((aa.graphMax-aa.graphMin)/2f, "Threshold", Color.black));\r
+     aa.setThreshold(new jalview.datamodel.GraphLine((aa.graphMax-aa.graphMin)/2f, "Threshold", Color.black));\r
    }\r
 \r
     AnnotationColourGradient acg = new AnnotationColourGradient(aa,\r