diff options
author | Liang Qi <liang.qi@qt.io> | 2018-01-29 20:49:23 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-01-29 20:49:24 +0100 |
commit | 27e8612fa415522b52e03de7430fbe2e8fff02e4 (patch) | |
tree | 5b7ede058e8183ba901c504cc8abfad767474abb /src/gui | |
parent | 11f6c646967c61e3eac6302a2d4ea8f30a41beff (diff) | |
parent | 3adfcbf1ed9b63c3ce41d7417658db3836fd3530 (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: I6b40ecee4db13e6329e7a0433b57c5bca473c63f
Diffstat (limited to 'src/gui')
-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); |