diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2011-09-20 11:42:35 (GMT) |
---|---|---|
committer | Jiang Jiang <jiang.jiang@nokia.com> | 2011-09-21 11:48:16 (GMT) |
commit | 128c4166ba445112ab73dd98b3e403da0489656e (patch) | |
tree | 2ee3850bfee8a6d67cd92d85d363f6e9b0711292 /src/gui/text | |
parent | c750afe0e0f043389d30850070889946e4c6e8af (diff) | |
download | Qt-128c4166ba445112ab73dd98b3e403da0489656e.zip Qt-128c4166ba445112ab73dd98b3e403da0489656e.tar.gz Qt-128c4166ba445112ab73dd98b3e403da0489656e.tar.bz2 |
Only limit cursor position when line is wrapped
Reviewed-by: Eskil
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qtextlayout.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |