diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2011-05-09 03:57:34 (GMT) |
---|---|---|
committer | Andrew den Exter <andrew.den-exter@nokia.com> | 2011-05-12 03:21:03 (GMT) |
commit | 88492fcea5d5c8dd6a8e1c2458a6a2b8747e84c7 (patch) | |
tree | 6b702abfa7298d68c09d79e4464e8ed8acd9e2e9 /src/gui/text | |
parent | 6fbfb1ab3f26ad672eb24f9b4a0ce1a8eea08298 (diff) | |
download | Qt-88492fcea5d5c8dd6a8e1c2458a6a2b8747e84c7.zip Qt-88492fcea5d5c8dd6a8e1c2458a6a2b8747e84c7.tar.gz Qt-88492fcea5d5c8dd6a8e1c2458a6a2b8747e84c7.tar.bz2 |
Ensure the TextEdit cursor delegate is repositioned on mouse events.
Update the micro focus when a mouse press changes the cursor position
of a read only TextEdit.
Change-Id: I11855037f7938b2cd23ac6ad165722b5289b4f46
Task-number: QTBUG-19109
Reviewed-by: Martin Jones
Diffstat (limited to 'src/gui/text')
-rw-r--r-- | src/gui/text/qtextcontrol.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index 3fd3ab5..cf8e313 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -1578,8 +1578,10 @@ void QTextControlPrivate::mousePressEvent(QEvent *e, Qt::MouseButton button, con emit q->cursorPositionChanged(); _q_updateCurrentCharFormatAndSelection(); } else { - if (cursor.position() != oldCursorPos) + if (cursor.position() != oldCursorPos) { emit q->cursorPositionChanged(); + emit q->microFocusChanged(); + } selectionChanged(); } repaintOldAndNewSelection(oldSelection); |