JAL-1553 enhancement of column selection by annotation row to include the query filte...
[jalview.git] / src / jalview / gui / AnnotationColourChooser.java
index 699b560..3c6fd88 100644 (file)
@@ -387,15 +387,18 @@ public class AnnotationColourChooser extends AnnotationRowFilter
 
   public void valueChanged(boolean updateAllAnnotation)
   {
-    if (currentColours.isSelected()
-            && !(av.getGlobalColourScheme() instanceof AnnotationColourGradient))
+    if (slider.isEnabled())
     {
-      updateView();
+      if (currentColours.isSelected()
+              && !(av.getGlobalColourScheme() instanceof AnnotationColourGradient))
+      {
+        updateView();
+      }
+      getCurrentAnnotation().threshold.value = slider.getValue() / 1000f;
+      propagateSeqAssociatedThreshold(updateAllAnnotation,
+              getCurrentAnnotation());
+      ap.paintAlignment(false);
     }
-    getCurrentAnnotation().threshold.value = slider.getValue() / 1000f;
-    propagateSeqAssociatedThreshold(updateAllAnnotation,
-            getCurrentAnnotation());
-    ap.paintAlignment(false);
   }
 
   public JComboBox<String> getThreshold()
@@ -422,10 +425,6 @@ public class AnnotationColourChooser extends AnnotationRowFilter
   @Override
   public void updateView()
   {
-    changeColour();
-  }
-  void changeColour()
-  {
     // Check if combobox is still adjusting
     if (adjusting)
     {