X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/dcbf1a11783d47e7e4fa30d488ac93a8bc547e71..fbd7cb02a511ff869d74aa4e758203a1cd340962:/src/dolphincontroller.cpp diff --git a/src/dolphincontroller.cpp b/src/dolphincontroller.cpp index fe8c426f3..46cb74520 100644 --- a/src/dolphincontroller.cpp +++ b/src/dolphincontroller.cpp @@ -59,7 +59,7 @@ void DolphinController::setItemView(QAbstractItemView* view) if (m_itemView != 0) { m_zoomLevel = ZoomLevelInfo::zoomLevelForIconSize(m_itemView->iconSize()); - + // TODO: this is a workaround until Qt-issue 176832 has been fixed connect(m_itemView, SIGNAL(pressed(const QModelIndex&)), this, SLOT(updateMouseButtonState())); @@ -129,12 +129,13 @@ void DolphinController::handleKeyPressEvent(QKeyEvent* event) const QItemSelectionModel* selModel = m_itemView->selectionModel(); const QModelIndex currentIndex = selModel->currentIndex(); const bool trigger = currentIndex.isValid() - && (event->key() == Qt::Key_Return) + && ((event->key() == Qt::Key_Return) + || (event->key() == Qt::Key_Enter)) && (selModel->selectedIndexes().count() > 0); if (trigger) { const QModelIndexList indexList = selModel->selectedIndexes(); foreach (const QModelIndex& index, indexList) { - triggerItem(index); + emit itemTriggered(itemForIndex(index)); } } }