mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
Bugfix: Currently, if you open dolphin, select a bunch of files, and right click and
select Open With > whatever, all the files are opened. Which is the right thing. However, if you hit enter to open those selected files, no file is opened. Currently, the file is only opened if there's only *one* file selected. The attached patch fixes this problem. svn path=/trunk/KDE/kdebase/apps/; revision=777695
This commit is contained in:
parent
ea5e9196b2
commit
c735913801
3 changed files with 27 additions and 9 deletions
|
@ -349,9 +349,15 @@ void DolphinColumnWidget::keyPressEvent(QKeyEvent* event)
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -377,9 +377,15 @@ void DolphinDetailsView::keyPressEvent(QKeyEvent* event)
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -297,9 +297,15 @@ void DolphinIconsView::keyPressEvent(QKeyEvent* event)
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue