Skip to content

Commit

Permalink
feat(ui): allow tree view keyboard navigation if query is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
trollixx committed Jan 3, 2020
1 parent 3118649 commit 6968e8e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libs/ui/searchsidebar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,14 @@ bool SearchSidebar::eventFilter(QObject *object, QEvent *event)
if (object == m_searchEdit && event->type() == QEvent::KeyPress) {
auto e = static_cast<QKeyEvent *>(event);
switch (e->key()) {
case Qt::Key_Home:
case Qt::Key_End:
case Qt::Key_Left:
case Qt::Key_Right:
if (!m_searchEdit->text().isEmpty()) {
break;
}
[[clang::fallthrough]];
case Qt::Key_Return:
case Qt::Key_Down:
case Qt::Key_Up:
Expand Down

0 comments on commit 6968e8e

Please sign in to comment.