From 3f82ecbd0e2cdf477e57c7fe41b63c09d7e84787 Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Wed, 25 May 2011 18:24:30 +0200 Subject: Fix boundry conditions for cursor hit test Clicking at the edge of a glyph means lookup for the left glyph. Reviewed-by: TrustMe (cherry picked from commit 31110bf84bb06d57983501fa65fe0db3f7c61927) --- src/gui/text/qtextengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 69598cf..9271f34 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -2739,7 +2739,7 @@ int QTextEngine::positionInLigature(const QScriptItem *si, int end, if (glyph_pos == -1 && end > 0) glyph_pos = logClusters[end - 1]; else { - if (x < edge) + if (x <= edge) glyph_pos--; } -- cgit v0.12