summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2011-03-28 01:33:58 (GMT)
committerAndrew den Exter <andrew.den-exter@nokia.com>2011-03-28 02:23:55 (GMT)
commite5a911351ae11376e6d86d70ddacd4016450ed6b (patch)
tree074a1454d88cce11757b7ea48123d90f12c8018c /src/gui
parent903fdabf3eb808a96e2a869049c2095cde09d2be (diff)
downloadQt-e5a911351ae11376e6d86d70ddacd4016450ed6b.zip
Qt-e5a911351ae11376e6d86d70ddacd4016450ed6b.tar.gz
Qt-e5a911351ae11376e6d86d70ddacd4016450ed6b.tar.bz2
Fix text selection with shift-click.
Move the cursor when word selection is NOT enabled. If word selection is enabled then then cursor would have been moved in a previous branch, the (incorrectly inverted) check was to prevent that being overridden. Change-Id: I788c3b41c6fdb250d6086893ea98a1aa8c302514 Task-number: QTBUG-18017 Reviewed-by: Alan Alpert
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qtextcontrol.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index 6babca1..1a81394 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -1551,7 +1551,7 @@ void QTextControlPrivate::mousePressEvent(QEvent *e, Qt::MouseButton button, con
extendBlockwiseSelection(cursorPos);
else if (selectedWordOnDoubleClick.hasSelection())
extendWordwiseSelection(cursorPos, pos.x());
- else if (wordSelectionEnabled)
+ else if (!wordSelectionEnabled)
setCursorPosition(cursorPos, QTextCursor::KeepAnchor);
} else {