hack for fastpaint Java bug upshifting one line after a sequence
[jalview.git] / src / jalview / gui / AlignmentPanel.java
index 2aa21bb..4e5e72b 100644 (file)
@@ -73,6 +73,7 @@ import javax.swing.SwingUtilities;
  * @author $author$
  * @version $Revision: 1.161 $
  */
+@SuppressWarnings("serial")
 public class AlignmentPanel extends GAlignmentPanel implements
         AdjustmentListener, Printable, AlignmentViewPanel, ViewportListenerI
 {
@@ -809,6 +810,12 @@ public class AlignmentPanel extends GAlignmentPanel implements
             av.isShowAutocalculatedAbove());
     sorter.sort(getAlignment().getAlignmentAnnotation(),
             av.getSortAnnotationsBy());
+    // BH 2019.04.18 this should not be necessary, but
+    // there is something wrong with the fast painting
+    // in that there is a -1 shift that should not be there.
+    // It is being covered in Java by the Consensus and Conservation
+    // threads forcing a full repaint after pasting.
+    seqPanel.seqCanvas.clearFastPaint();
     repaint();
 
     if (updateStructures)
@@ -1711,4 +1718,5 @@ public class AlignmentPanel extends GAlignmentPanel implements
   {
     return calculationDialog;
   }
+
 }