diff options
Diffstat (limited to 'javax/swing/JViewport.java')
-rw-r--r-- | javax/swing/JViewport.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/javax/swing/JViewport.java b/javax/swing/JViewport.java index 5ad9593b4..1e8bec82e 100644 --- a/javax/swing/JViewport.java +++ b/javax/swing/JViewport.java @@ -710,9 +710,11 @@ public class JViewport extends JComponent implements Accessible protected boolean computeBlit(int dx, int dy, Point blitFrom, Point blitTo, Dimension blitSize, Rectangle blitPaint) { - if ((dx != 0 && dy != 0) || damaged) + if ((dx != 0 && dy != 0) || (dy == 0 && dy == 0) || damaged) // We cannot blit if the viewport is scrolled in both directions at - // once. + // once. Also, we do not want to blit if the viewport is not scrolled at + // all, because that probably means the view component repaints itself + // and the buffer needs updating. return false; Rectangle portBounds = SwingUtilities.calculateInnerArea(this, getBounds()); |