widgets: Simplify markNeedsFlush in QWidgetPrivate::drawWidget
QWidgetRepaintManager::markNeedsFlush already ignores paintOnScreen widgets. Change-Id: I8b5d6f79c8fd60115f77d65aef05cc4baf840bdd Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>bb10
parent
25026defdc
commit
ebec918722
|
|
@ -5309,7 +5309,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
|
|||
|
||||
// Native widgets need to be marked dirty on screen so painting will be done in correct context
|
||||
// Same check as in the no effects case below.
|
||||
if (repaintManager && !onScreen && !asRoot && (q->internalWinId() || !q->nativeParentWidget()->isWindow()))
|
||||
if (repaintManager && !asRoot && (q->internalWinId() || !q->nativeParentWidget()->isWindow()))
|
||||
repaintManager->markNeedsFlush(q, rgn, offset);
|
||||
|
||||
return;
|
||||
|
|
@ -5417,7 +5417,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
|
|||
}
|
||||
|
||||
// Native widgets need to be marked dirty on screen so painting will be done in correct context
|
||||
if (repaintManager && !onScreen && !asRoot && (q->internalWinId() || (q->nativeParentWidget() && !q->nativeParentWidget()->isWindow())))
|
||||
if (repaintManager && !asRoot && (q->internalWinId() || (q->nativeParentWidget() && !q->nativeParentWidget()->isWindow())))
|
||||
repaintManager->markNeedsFlush(q, toBePainted, offset);
|
||||
|
||||
//restore
|
||||
|
|
|
|||
Loading…
Reference in New Issue