Fix QWidget::scroll during painting

Calling scroll during painting fails in cases where the scroll is
attempted accelerated. This is easily fixed by not using accelerated
scrolling during painting.

Task-number: QTBUG-41615
Change-Id: I38d2428d5679c242f13d53793a3dc3b8e01b538f
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
bb10
Allan Sandfeld Jensen 2014-10-27 17:04:37 +01:00 committed by Allan Sandfeld Jensen
parent 11e09a440b
commit a0bdbc1442
1 changed files with 1 additions and 1 deletions

View File

@ -869,7 +869,7 @@ void QWidgetPrivate::scrollRect(const QRect &rect, int dx, int dy)
QRect scrollRect = rect & clipRect();
bool overlapped = false;
bool accelerateScroll = accelEnv && isOpaque
bool accelerateScroll = accelEnv && isOpaque && !q_func()->testAttribute(Qt::WA_WState_InPaintEvent)
&& !(overlapped = isOverlapped(scrollRect.translated(data.crect.topLeft())));
if (!accelerateScroll) {