All pastes #911753 Raw Edit

Something

public text v1 · immutable
·published 2008-02-20 22:14 UTC
rendered paste body
Index: src/dolphiniconsview.cpp
===================================================================
--- src/dolphiniconsview.cpp    (revisión: 775296)
+++ src/dolphiniconsview.cpp    (copia de trabajo)
@@ -289,9 +289,15 @@
     const QModelIndex currentIndex = selModel->currentIndex();
     const bool trigger = currentIndex.isValid()
                          && (event->key() == Qt::Key_Return)
-                         && (selModel->selectedIndexes().count() <= 1);
-    if (trigger) {
-        triggerItem(currentIndex);
+                         && (selModel->selectedIndexes().count() > 0);
+    if(trigger) {
+        const QModelIndexList indexList = selModel->selectedIndexes();
+        foreach (const QModelIndex &index, indexList) {
+            KFileItem item = itemForIndex(index);
+            if (!item.isNull()) {
+                triggerItem(currentIndex);
+            }
+        }
     }
 }

Index: src/dolphindetailsview.cpp
===================================================================
--- src/dolphindetailsview.cpp  (revisión: 775296)
+++ src/dolphindetailsview.cpp  (copia de trabajo)
@@ -350,9 +350,15 @@
     const QModelIndex currentIndex = selModel->currentIndex();
     const bool trigger = currentIndex.isValid()
                          && (event->key() == Qt::Key_Return)
-                         && (selModel->selectedIndexes().count() <= 1);
-    if (trigger) {
-        triggerItem(currentIndex);
+                         && (selModel->selectedIndexes().count() > 0);
+    if(trigger) {
+        const QModelIndexList indexList = selModel->selectedIndexes();
+        foreach (const QModelIndex &index, indexList) {
+            KFileItem item = itemForIndex(index);
+            if (!item.isNull()) {
+                triggerItem(currentIndex);
+            }
+        }
     }
 }

Index: src/dolphincolumnwidget.cpp
===================================================================
--- src/dolphincolumnwidget.cpp (revisión: 775296)
+++ src/dolphincolumnwidget.cpp (copia de trabajo)
@@ -340,9 +340,15 @@
     const QModelIndex currentIndex = selModel->currentIndex();
     const bool trigger = currentIndex.isValid()
                          && (event->key() == Qt::Key_Return)
-                         && (selModel->selectedIndexes().count() <= 1);
-    if (trigger) {
-        triggerItem(currentIndex);
+                         && (selModel->selectedIndexes().count() > 0);
+    if(trigger) {
+        const QModelIndexList indexList = selModel->selectedIndexes();
+        foreach (const QModelIndex &index, indexList) {
+            KFileItem item = itemForIndex(index);
+            if (!item.isNull()) {
+                triggerItem(currentIndex);
+            }
+        }
     }
 }