diff options
author | Liang Qi <liang.qi@qt.io> | 2018-02-14 15:49:08 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2018-02-14 15:49:08 +0000 |
commit | 7bc1d6effaae8f5aa1bef92cb1094ec3b3f4fb95 (patch) | |
tree | cde8deeea717fc25d64640d96cf13a4fd44d9db1 /src/gui/kernel/qplatforminputcontext.cpp | |
parent | 2aeb2bcef48d7bca2186c262dde433737956a539 (diff) | |
parent | 305dd1b61f657474d751cc3b24f58249ec21b61b (diff) |
Merge "Merge remote-tracking branch 'origin/5.9' into 5.11" into refs/staging/5.11
Diffstat (limited to 'src/gui/kernel/qplatforminputcontext.cpp')
-rw-r--r-- | src/gui/kernel/qplatforminputcontext.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatforminputcontext.cpp b/src/gui/kernel/qplatforminputcontext.cpp index 3f59116e9a..9771e6ba11 100644 --- a/src/gui/kernel/qplatforminputcontext.cpp +++ b/src/gui/kernel/qplatforminputcontext.cpp @@ -287,6 +287,8 @@ void QPlatformInputContext::setSelectionOnFocusObject(const QPointF &anchorPos, if (success) { int cursor = QInputMethod::queryFocusObject(Qt::ImCursorPosition, cursorPos * mapToLocal).toInt(&success); if (success) { + if (anchor == cursor && anchorPos != cursorPos) + return; QList<QInputMethodEvent::Attribute> imAttributes; imAttributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Selection, anchor, cursor - anchor, QVariant())); QInputMethodEvent event(QString(), imAttributes); |