aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-10-05 16:27:14 +0200
committerQt by Nokia <qt-info@nokia.com>2011-10-06 15:31:34 +0200
commit72247d8290e3f5ab07911354760a2e9b7a5b2caf (patch)
treef8de741d9cd809ef2bda27faff6636d45d60f7c2
parentfcc38abf68f862d0a492a0fbabdc02f85befa603 (diff)
Fix missing inline images
Oops, the change to support floating images caused a regression, as it caused all images represented by object replacement characters to be ignored instead of only the ones that were floating and were handled elsewhere. The correct test is less strict, only verifying that the layout position is InFlow. Change-Id: Ib28ea595b598bbd047eebe1a704211f0ba139382 Reviewed-on: http://codereview.qt-project.org/6074 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
-rw-r--r--src/declarative/items/qsgtextnode.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/declarative/items/qsgtextnode.cpp b/src/declarative/items/qsgtextnode.cpp
index 1dd3564425..f712bd768e 100644
--- a/src/declarative/items/qsgtextnode.cpp
+++ b/src/declarative/items/qsgtextnode.cpp
@@ -1163,8 +1163,7 @@ void QSGTextNode::addTextDocument(const QPointF &, QTextDocument *textDocument,
engine.setPosition(blockPosition);
if (text.contains(QChar::ObjectReplacementCharacter)) {
QTextFrame *frame = qobject_cast<QTextFrame *>(textDocument->objectForFormat(charFormat));
- if (frame && frame->frameFormat().position() == QTextFrameFormat::InFlow
- && frame->firstPosition() <= frame->lastPosition()) {
+ if (frame && frame->frameFormat().position() == QTextFrameFormat::InFlow) {
BinaryTreeNode::SelectionState selectionState =
(selectionStart < textPos + text.length()
&& selectionEnd >= textPos)