diff options
Diffstat (limited to 'src/gui/text/qtextlayout.cpp')
-rw-r--r-- | src/gui/text/qtextlayout.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index d0c1a0e..a86cf05 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -2612,6 +2612,9 @@ qreal QTextLine::cursorToX(int *cursorPos, Edge edge) const x += eng->offsetInLigature(si, pos, end, glyph_pos); } + if (eng->option.wrapMode() != QTextOption::NoWrap && x > line.width) + x = line.width; + *cursorPos = pos + si->position; return x.toReal(); } |