┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistcontroller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kitemviews/kitemlistcontroller.cpp')
-rw-r--r--src/kitemviews/kitemlistcontroller.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/kitemviews/kitemlistcontroller.cpp b/src/kitemviews/kitemlistcontroller.cpp
index 955e418e8..29a5bd87a 100644
--- a/src/kitemviews/kitemlistcontroller.cpp
+++ b/src/kitemviews/kitemlistcontroller.cpp
@@ -436,13 +436,10 @@ bool KItemListController::keyPressEvent(QKeyEvent* event)
m_selectionManager->setSelected(index, 1, KItemListSelectionManager::Toggle);
m_selectionManager->beginAnchoredSelection(index);
break;
- } else {
- // Select the current item if it is not selected yet.
- const int current = m_selectionManager->currentItem();
- if (!m_selectionManager->isSelected(current)) {
- m_selectionManager->setSelected(current);
- break;
- }
+ } else if (m_keyboardManager->addKeyBeginsNewSearch()) { // File names shouldn't start with a space,
+ // so we can use this press as a keyboard shortcut instead.
+ Q_EMIT selectionModeChangeRequested(!m_selectionMode);
+ break;
}
}
Q_FALLTHROUGH(); // fall through to the default case and add the Space to the current search string.