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>
This commit is contained in:
parent
3cf9621fa0
commit
793b7e8008
@ -2810,7 +2810,6 @@ int QTextLine::xToCursor(qreal _x, CursorPosition cpos) const
|
||||
break;
|
||||
glyph_pos = gs;
|
||||
edge = pos;
|
||||
break;
|
||||
}
|
||||
pos -= glyphs.effectiveAdvance(gs);
|
||||
++gs;
|
||||
|
Loading…
Reference in New Issue
Block a user