summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-03-13 15:18:10 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-03-18 22:55:47 +0000
commit90461979bcf0bf89027053eec37047ff7b88752f (patch)
treee7b6513b30bfbf8df221050bc1eafad09d34a1a5 /src/gui/text
parentee7fea33383726f0bb72e8082a357820e3ee3675 (diff)
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>
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
index 1ddc9141af..74371d77c0 100644
--- a/src/gui/text/qtextdocumentlayout.cpp
+++ b/src/gui/text/qtextdocumentlayout.cpp
@@ -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();