adds an explicit clearing of the SeqCanvas fastPaint flag upon viewport
[jalview.git] / src / jalview / appletgui / SeqCanvas.java
index 96eb6b9..f055776 100755 (executable)
@@ -40,6 +40,7 @@ import java.awt.Panel;
 import java.beans.PropertyChangeEvent;
 import java.util.Iterator;
 
+@SuppressWarnings("serial")
 public class SeqCanvas extends Panel implements ViewportListenerI
 {
   FeatureRenderer fr;
@@ -905,4 +906,19 @@ public class SeqCanvas extends Panel implements ViewportListenerI
     }
   }
 
+  /**
+   * Ensure that a full paint is done next, for whatever reason. This was
+   * necessary for JavaScript; apparently in Java the timing is just right on
+   * multiple threads (EventQueue-0, Consensus, Conservation) that we can get
+   * away with one fast paint before the others, but this ensures that in the
+   * end we get a full paint. Problem arose in relation to copy/paste, where the
+   * paste was not finalized with a full paint.
+   * 
+   * @author hansonr 2019.04.17
+   */
+  public void clearFastPaint()
+  {
+    fastPaint = false;
+  }
+
 }