summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorFrank Reininghaus <frank78ac@googlemail.com>2009-10-12 19:12:39 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-10-13 08:20:41 (GMT)
commit6201e4adda316e5a582af687cdd2f1bcd19be31d (patch)
treedcb1a1fc96b60f911bd84356e4e422b7f8d2f6c4 /src/gui
parent6a1be803bf94b8af4a4766e31df9b441d1c81eed (diff)
downloadQt-6201e4adda316e5a582af687cdd2f1bcd19be31d.zip
Qt-6201e4adda316e5a582af687cdd2f1bcd19be31d.tar.gz
Qt-6201e4adda316e5a582af687cdd2f1bcd19be31d.tar.bz2
Itemview: fix regression concerning Ctrl+rubber band selections
When making a rubber band selection while Control is pressed in an itemview with extended selection, make sure that the selection state of the items inside the rubber band is toggled. This ammend commit 0644e3dce532b1df00a77d3a30c61d6b75d3ff30 Merge-request: 1759 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com> Reviewed-by: Gabriel Task-number: QTBUG-1435 Task-number: 191545
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index 268e78e..13a1662 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -1697,7 +1697,7 @@ void QAbstractItemView::mouseMoveEvent(QMouseEvent *event)
if ((event->buttons() & Qt::LeftButton) && d->selectionAllowed(index) && d->selectionModel) {
setState(DragSelectingState);
QItemSelectionModel::SelectionFlags command = selectionCommand(index, event);
- if (command.testFlag(QItemSelectionModel::Toggle)) {
+ if (d->ctrlDragSelectionFlag != QItemSelectionModel::NoUpdate && command.testFlag(QItemSelectionModel::Toggle)) {
command &= ~QItemSelectionModel::Toggle;
command |= d->ctrlDragSelectionFlag;
}