widgets: Simplify QWidgetRepaintManager::sync

Change-Id: Ifd0cdcd7f4c03112fd93c24707e43273e211f688
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
Tor Arne Vestbø 2019-08-22 17:30:32 +02:00
parent 36d734b3f8
commit 0af7e5564c

View File

@ -729,10 +729,8 @@ void QWidgetRepaintManager::sync(QWidget *exposedWidget, const QRegion &exposedR
return;
}
if (exposedWidget != tlw)
markNeedsFlush(exposedWidget, exposedRegion, exposedWidget->mapTo(tlw, QPoint()));
else
markNeedsFlush(exposedWidget, exposedRegion, QPoint());
QPoint offset = exposedWidget != tlw ? exposedWidget->mapTo(tlw, QPoint()) : QPoint();
markNeedsFlush(exposedWidget, exposedRegion, offset);
if (syncAllowed())
paintAndFlush();