JAL-2774 Fix fastpaint of wrapped alignment
[jalview.git] / src / jalview / gui / SeqCanvas.java
index 7724592..6919f8a 100755 (executable)
@@ -1712,7 +1712,14 @@ public class SeqCanvas extends JComponent implements ViewportListenerI
       }
       else if (eventName.equals(ViewportRanges.STARTRESANDSEQ))
       {
-        fastPaint(scrollX, 0);
+        if (av.getWrapAlignment())
+        {
+          fastPaintWrapped(scrollX);
+        }
+        else
+        {
+          fastPaint(scrollX, 0);
+        }
         // bizarrely, we only need to scroll on the x value here as fastpaint
         // copies the full height of the image anyway. Passing in the y value
         // causes nasty repaint artefacts, which only disappear on a full