Commit 0cb5a67e authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Fix repainting for repaints with small regions

Makes this statement similar to the one that uses pe->rect() instead of pe->region().rects()

You can test it by:
 * Opening a document with okular
 * Scroll down a bit so that you are not on the top of the viewing area
 * Open the review tool
 * Move the review tool around
 * See how it leaves unrepainted garbage
 * See how this patch fixes it
(cherry picked from commit 9f654a00)
parent b8663a39
......@@ -1327,7 +1327,7 @@ void PageView::paintEvent(QPaintEvent *pe)
if ( useSubdivision )
{
// set 'contentsRect' to a part of the sub-divided region
contentsRect = allRects[i].normalized().intersect( viewportRect );
contentsRect = allRects[i].translated( areaPos ).intersect( viewportRect );
if ( !contentsRect.isValid() )
continue;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment