diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2011-03-08 02:22:23 (GMT) |
---|---|---|
committer | Andrew den Exter <andrew.den-exter@nokia.com> | 2011-03-08 03:09:55 (GMT) |
commit | 6a0221d77ec768273a093268a86e30e82fcab934 (patch) | |
tree | db6b97e306adad70fb4415bf1063ddcab5e7ab18 /src/gui | |
parent | 88c4bd4d5fc25a58d3b71c540acd6f2484c3a9a3 (diff) | |
download | Qt-6a0221d77ec768273a093268a86e30e82fcab934.zip Qt-6a0221d77ec768273a093268a86e30e82fcab934.tar.gz Qt-6a0221d77ec768273a093268a86e30e82fcab934.tar.bz2 |
Update TextEdit's visible selection when only the anchor changes.
At the limits of a TextEdit's text a key press can change/reset the anchor
position without changing the cursor position. Checking the cursor position
alone isn't enough to determine the selection hasn't changed.
Change-Id: Ic425ac0c06897d77e9c86b907ff10b39d78dd7a1
Task-number: QTBUG-17982
Reviewed-by: Martin Jones
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/text/qtextcontrol.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp index f4054d3..f5da079 100644 --- a/src/gui/text/qtextcontrol.cpp +++ b/src/gui/text/qtextcontrol.cpp @@ -284,7 +284,7 @@ bool QTextControlPrivate::cursorMoveKeyEvent(QKeyEvent *e) if (cursor.position() != oldCursorPos) emit q->cursorPositionChanged(); emit q->microFocusChanged(); - } else if (ignoreNavigationEvents && isNavigationEvent) { + } else if (ignoreNavigationEvents && isNavigationEvent && oldSelection.anchor() == cursor.anchor()) { return false; } |