Use paintAlignment
[jalview.git] / src / jalview / gui / AnnotationColourChooser.java
index ba76858..31c7ba7 100755 (executable)
@@ -39,7 +39,7 @@ public class AnnotationColourChooser
   jalview.datamodel.AlignmentAnnotation currentAnnotation;\r
   boolean adjusting = false;\r
 \r
-  public AnnotationColourChooser(AlignViewport av, AlignmentPanel ap)\r
+  public AnnotationColourChooser(AlignViewport av, final AlignmentPanel ap)\r
   {\r
     oldcs = av.getGlobalColourScheme();\r
     if (av.alignment.getGroups() != null)\r
@@ -81,6 +81,13 @@ public class AnnotationColourChooser
         }\r
       }\r
     });\r
+    slider.addMouseListener(new MouseAdapter()\r
+        {\r
+          public void mouseReleased(MouseEvent evt)\r
+          {\r
+            ap.paintAlignment(true);\r
+          }\r
+        });\r
 \r
     if (av.alignment.getAlignmentAnnotation() == null)\r
     {\r
@@ -405,7 +412,7 @@ public class AnnotationColourChooser
       }\r
     }\r
 \r
-    ap.repaint();\r
+    ap.paintAlignment(false);\r
   }\r
 \r
   public void ok_actionPerformed(ActionEvent e)\r
@@ -480,7 +487,7 @@ public class AnnotationColourChooser
     }\r
 \r
     currentAnnotation.threshold.value = (float) slider.getValue() / 1000f;\r
-    ap.repaint();\r
+    ap.paintAlignment(false);\r
   }\r
 \r
   public void currentColours_actionPerformed(ActionEvent e)\r