summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qtextlayout.cpp
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-05-25 10:55:52 +0200
committerJiang Jiang <jiang.jiang@nokia.com>2011-05-25 11:31:31 +0200
commite38aaf9f7c91efb6197f7f579e3064e0e6dcce1e (patch)
tree10097962202c9f950887ec071848950254e2ffd5 /src/gui/text/qtextlayout.cpp
parent4c0ba0242ab70506dbd9a8b1dbf32bf7e670ed85 (diff)
Fix cursor position test on CursorOnCharacter case
Reviewed-by: TrustMe
Diffstat (limited to 'src/gui/text/qtextlayout.cpp')
-rw-r--r--src/gui/text/qtextlayout.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index a9179edcb1..4b3c9e7929 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -2677,10 +2677,12 @@ int QTextLine::xToCursor(qreal _x, CursorPosition cpos) const
}
}
if (qAbs(x-pos) < dist)
- return eng->positionInLigature(&si, end, x, pos, -1);
+ return eng->positionInLigature(&si, end, x, pos, -1,
+ cpos == QTextLine::CursorOnCharacter);
}
Q_ASSERT(glyph_pos != -1);
- return eng->positionInLigature(&si, end, x, edge, glyph_pos);
+ return eng->positionInLigature(&si, end, x, edge, glyph_pos,
+ cpos == QTextLine::CursorOnCharacter);
}
}
// right of last item