Avoid using the current frame as the previous in layout

When continuing a previous layout, we would in some cases add a wrong
margin because we would treat the current frame as preceding itself.

Task-number: QTBUG-42269
Change-Id: Idf00fadbed890ce34b073cf670cc9b8e1d4b0d5d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
bb10
Allan Sandfeld Jensen 2015-03-13 15:18:10 +01:00
parent ee7fea3338
commit 90461979bc
1 changed files with 1 additions and 1 deletions

View File

@ -2432,7 +2432,7 @@ void QTextDocumentLayoutPrivate::layoutFlow(QTextFrame::Iterator it, QTextLayout
++it;
} else {
QTextFrame::Iterator lastIt;
if (!previousIt.atEnd())
if (!previousIt.atEnd() && previousIt != it)
lastIt = previousIt;
previousIt = it;
QTextBlock block = it.currentBlock();