From 128c4166ba445112ab73dd98b3e403da0489656e Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Tue, 20 Sep 2011 13:42:35 +0200 Subject: Only limit cursor position when line is wrapped Reviewed-by: Eskil --- src/gui/text/qtextlayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index a2662c4..a86cf05 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -2612,7 +2612,7 @@ qreal QTextLine::cursorToX(int *cursorPos, Edge edge) const x += eng->offsetInLigature(si, pos, end, glyph_pos); } - if (x > line.width) + if (eng->option.wrapMode() != QTextOption::NoWrap && x > line.width) x = line.width; *cursorPos = pos + si->position; -- cgit v0.12