diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/QuickMedia.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 7027ac9..287c911 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -939,16 +939,24 @@ namespace QuickMedia { redraw = true; else if(event.type == sf::Event::KeyPressed) { if(event.key.code == sf::Keyboard::Up) { - if(tabs[selected_tab].body ) tabs[selected_tab].body->select_previous_item(); + if(tabs[selected_tab].body) tabs[selected_tab].body->select_previous_item(); } else if(event.key.code == sf::Keyboard::Down) { if(tabs[selected_tab].body) tabs[selected_tab].body->select_next_item(); } else if(event.key.code == sf::Keyboard::Escape) { current_page = Page::EXIT; exit_code = 1; } else if(event.key.code == sf::Keyboard::Left) { + if(tabs[selected_tab].body) { + tabs[selected_tab].body->filter_search_fuzzy(""); + tabs[selected_tab].body->clamp_selection(); + } selected_tab = std::max(0, selected_tab - 1); search_bar->clear(); } else if(event.key.code == sf::Keyboard::Right) { + if(tabs[selected_tab].body) { + tabs[selected_tab].body->filter_search_fuzzy(""); + tabs[selected_tab].body->clamp_selection(); + } selected_tab = std::min((int)tabs.size() - 1, selected_tab + 1); search_bar->clear(); } else if(event.key.code == sf::Keyboard::Tab) { |