From: Peter Penz Date: Tue, 7 Aug 2007 06:34:05 +0000 (+0000) Subject: column view: fixed SHIFT modifier selection behavior X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/04a20a0d07d64eef6382298bde9f82486277da2c?ds=inline column view: fixed SHIFT modifier selection behavior svn path=/trunk/KDE/kdebase/apps/; revision=697218 --- diff --git a/src/dolphincolumnview.cpp b/src/dolphincolumnview.cpp index 99a5fea7e..b26fe9067 100644 --- a/src/dolphincolumnview.cpp +++ b/src/dolphincolumnview.cpp @@ -250,6 +250,9 @@ void ColumnWidget::mousePressEvent(QMouseEvent* event) const Qt::KeyboardModifiers modifier = QApplication::keyboardModifiers(); if (modifier & Qt::ControlModifier) { m_view->requestActivation(this); + if (!selModel->hasSelection()) { + selModel->setCurrentIndex(index, QItemSelectionModel::Select); + } selModel->select(index, QItemSelectionModel::Toggle); swallowMousePressEvent = true; } else if (item->isDir()) { @@ -267,9 +270,6 @@ void ColumnWidget::mousePressEvent(QMouseEvent* event) m_view->requestActivation(this); } - // TODO: check behavior with ShiftModifier - //if (modifier & Qt::ShiftModifier) - // TODO: is the assumption OK that Qt::RightButton always represents the context menu button? if (event->button() == Qt::RightButton) { swallowMousePressEvent = true;