column view: fixed SHIFT modifier selection behavior

svn path=/trunk/KDE/kdebase/apps/; revision=697218
This commit is contained in:
Peter Penz 2007-08-07 06:34:05 +00:00
parent e3b4cb8315
commit 04a20a0d07

View file

@ -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;