All pastes #911767 Raw Edit

Anonymous

public text v1 · immutable
·published 2008-02-20 22:21 UTC
rendered paste body
Index: src/dolphiniconsview.cpp
===================================================================
--- src/dolphiniconsview.cpp    (revisión: 777565)
+++ src/dolphiniconsview.cpp    (copia de trabajo)
@@ -297,9 +297,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(index);
+            }
+        }
     }
 }

Index: src/dolphindetailsview.cpp
===================================================================
--- src/dolphindetailsview.cpp  (revisión: 777565)
+++ src/dolphindetailsview.cpp  (copia de trabajo)
@@ -377,9 +377,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(index);
+            }
+        }
     }
 }

Index: src/dolphincolumnwidget.cpp
===================================================================
--- src/dolphincolumnwidget.cpp (revisión: 777565)
+++ src/dolphincolumnwidget.cpp (copia de trabajo)
@@ -349,9 +349,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(index);
+            }
+        }
     }
 }