summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorAndrey Volykhin <andrey.volykhin@lge.com>2014-05-08 17:10:25 +0400
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-12 10:26:14 +0200
commit793b7e80083d77b0804a40b5732a8888c9ce5cd8 (patch)
treed845326b9430de5902f42bda5f0a23ff53dd5c58 /src/gui/text
parent3cf9621fa02b17a36dacf336adcc9ed993de7699 (diff)
QTextLayout: Fix cursor position calculation for BiDi text
Due excess 'break' in loop, function xToCursor() with "CursorOnCharacter" option for BiDI text returns wrong cursor position (start glyph position) all time. Task-number: QTBUG-38846 Change-Id: Iba6671905e0785da6f343db19d6c3bb3e2cf5e8a Reviewed-by: Andrey Volykhin <andrey.volykhin@lge.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qtextlayout.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index c3cf2e56bb..84ad9038d5 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -2810,7 +2810,6 @@ int QTextLine::xToCursor(qreal _x, CursorPosition cpos) const
break;
glyph_pos = gs;
edge = pos;
- break;
}
pos -= glyphs.effectiveAdvance(gs);
++gs;