diff options
Diffstat (limited to 'src/dolphincolumnwidget.cpp')
| -rw-r--r-- | src/dolphincolumnwidget.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/dolphincolumnwidget.cpp b/src/dolphincolumnwidget.cpp index 5ef86a29d..d65e9aa57 100644 --- a/src/dolphincolumnwidget.cpp +++ b/src/dolphincolumnwidget.cpp @@ -393,7 +393,8 @@ void DolphinColumnWidget::keyPressEvent(QKeyEvent* event) DolphinController* controller = m_view->m_controller; controller->handleKeyPressEvent(event); - if (event->key() == Qt::Key_Right) { + switch (event->key()) { + case Qt::Key_Right: { // Special key handling for the column: A Key_Right should // open a new column for the currently selected folder. const QModelIndex index = currentIndex(); @@ -401,6 +402,17 @@ void DolphinColumnWidget::keyPressEvent(QKeyEvent* event) if (!item.isNull() && item.isDir()) { controller->emitItemTriggered(item); } + break; + } + + case Qt::Key_Escape: + selectionModel()->setCurrentIndex(selectionModel()->currentIndex(), + QItemSelectionModel::Current | + QItemSelectionModel::Clear); + break; + + default: + break; } if (m_toolTipManager != 0) { |
