diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-03-02 01:00:10 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-03-02 01:00:10 +0100 |
commit | 6cf3428a43c5744096db0c849aa975c4cb06bd31 (patch) | |
tree | f7961a992461793ea40781516903c5dd629fe1e5 /src/gui/text/qtextlayout.cpp | |
parent | 529cb7217c0162c31ef6f309730e93612b9798d3 (diff) | |
parent | b3e91b66b9175c1c3ff5f73f3ac231f74f9bf932 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I42ec9e6aafc203465cbeb88af70c7af26b7df8ed
Diffstat (limited to 'src/gui/text/qtextlayout.cpp')
-rw-r--r-- | src/gui/text/qtextlayout.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index 5afe18751f..cd1990dfb9 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -2758,6 +2758,7 @@ qreal QTextLine::cursorToX(int *cursorPos, Edge edge) const glyph_start++; for (int i = glyph_end - 1; i >= glyph_start; i--) x += glyphs.effectiveAdvance(i); + x -= eng->offsetInLigature(si, pos, end, glyph_pos); } else { int start = qMax(line.from - si->position, 0); int glyph_start = logClusters[start]; @@ -2766,8 +2767,8 @@ qreal QTextLine::cursorToX(int *cursorPos, Edge edge) const glyph_end--; for (int i = glyph_start; i <= glyph_end; i++) x += glyphs.effectiveAdvance(i); + x += eng->offsetInLigature(si, pos, end, glyph_pos); } - x += eng->offsetInLigature(si, pos, end, glyph_pos); } if (eng->option.wrapMode() != QTextOption::NoWrap && x > line.x + line.width) |