JAL-3829 pushed the PDBFTSClient specific code to new ‘StructureChooserQuerySource...
[jalview.git] / src / jalview / workers / AnnotationWorker.java
index 4d81307..8f37f15 100644 (file)
@@ -47,11 +47,11 @@ class AnnotationWorker extends AlignCalcWorker
    * @param af
    * @param counter
    */
-  public AnnotationWorker(AlignViewportI viewport,
-          AlignmentViewPanel panel, AnnotationProviderI counter)
+  public AnnotationWorker(AlignViewportI viewport, AlignmentViewPanel panel,
+          AnnotationProviderI counter)
   {
     super(viewport, panel);
-    ourAnnots = new ArrayList<AlignmentAnnotation>();
+    ourAnnots = new ArrayList<>();
     this.counter = counter;
     calcMan.registerWorker(this);
   }
@@ -121,7 +121,10 @@ class AnnotationWorker extends AlignCalcWorker
     if (ap != null)
     {
       ap.adjustAnnotationHeight();
-      ap.paintAlignment(true);
+      // TODO: only need to update colour and geometry if panel height changes
+      // and view is coloured by annotation, and the annotation is actually
+      // changed!
+      ap.paintAlignment(true, true);
     }
   }