diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2011-05-09 13:57:34 +1000 |
---|---|---|
committer | Andrew den Exter <andrew.den-exter@nokia.com> | 2011-05-12 13:21:03 +1000 |
commit | 88492fcea5d5c8dd6a8e1c2458a6a2b8747e84c7 (patch) | |
tree | 6b702abfa7298d68c09d79e4464e8ed8acd9e2e9 /src/gui/text/qtextcontrol.cpp | |
parent | 6fbfb1ab3f26ad672eb24f9b4a0ce1a8eea08298 (diff) |
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/qtextcontrol.cpp')
-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 3fd3ab51d5..cf8e313abe 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); |