┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinview.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-02-11 20:04:18 +0000
committerPeter Penz <[email protected]>2007-02-11 20:04:18 +0000
commitdc3e19744dedef4b185eb0becb00a28c74381c4c (patch)
tree795b370e65deaf04ba80f982832697df35bd88ea /src/dolphinview.cpp
parent64ef4394f97af721d364390ba00338b3a4006488 (diff)
don't trigger an item if the user does a selection by using the control- or shift-modifier
svn path=/trunk/playground/utils/dolphin/; revision=632633
Diffstat (limited to 'src/dolphinview.cpp')
-rw-r--r--src/dolphinview.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/dolphinview.cpp b/src/dolphinview.cpp
index 2b4546751..eddd220d3 100644
--- a/src/dolphinview.cpp
+++ b/src/dolphinview.cpp
@@ -22,6 +22,7 @@
#include <assert.h>
+#include <QApplication>
#include <QDropEvent>
#include <QItemSelectionModel>
#include <QMouseEvent>
@@ -610,15 +611,22 @@ void DolphinView::loadDirectory(const KUrl& url)
void DolphinView::triggerItem(const QModelIndex& index)
{
+ const Qt::KeyboardModifiers modifier = QApplication::keyboardModifiers();
+ if ((modifier & Qt::ShiftModifier) || (modifier & Qt::ControlModifier)) {
+ // items are selected by the user, hence don't trigger the
+ // item specified by 'index'
+ return;
+ }
+
KFileItem* item = m_dirModel->itemForIndex(m_proxyModel->mapToSource(index));
if (item == 0) {
return;
}
if (item->isDir()) {
- // Prefer the local path over the Url. This assures that the
- // volume space information is correct. Assuming that the Url is media:/sda1,
- // and the local path is /windows/C: For the Url the space info is related
+ // Prefer the local path over the URL. This assures that the
+ // volume space information is correct. Assuming that the URL is media:/sda1,
+ // and the local path is /windows/C: For the URL the space info is related
// to the root partition (and hence wrong) and for the local path the space
// info is related to the windows partition (-> correct).
const QString localPath(item->localPath());