If an image in a text node is at the start of a line include the
relative position of the line when positioning it.
Task-number: QTBUG-23410
Change-Id: Ic9927bf86386374a23acfc6b4478a26f86d43ec6
Reviewed-by: Martin Jones <martin.jones@nokia.com>
QRectF searchRect = rect;
if (layoutPosition == QTextFrameFormat::InFlow) {
if (m_currentLineTree.isEmpty()) {
- searchRect.moveTopLeft(m_position);
+ searchRect.moveTopLeft(m_position + m_currentLine.position());
} else {
const BinaryTreeNode *lastNode = m_currentLineTree.data() + m_currentLineTree.size() - 1;
if (lastNode->glyphRun.isRightToLeft()) {