From 31908e0a717452a8db311f9c6cbf5c24e7e4eea3 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 21 May 2021 02:21:18 +0200 Subject: Do not reset selection on submit for manga --- src/QuickMedia.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 33abe18..201d0af 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -1601,10 +1601,10 @@ namespace QuickMedia { if(!tabs[selected_tab].search_bar->get_text().empty()) { tabs[selected_tab].search_bar->clear(); tabs[selected_tab].search_bar->onTextUpdateCallback(""); - } else { - //int selected_item_index = tabs[selected_tab].body->get_selected_item(); - //tabs[selected_tab].body->select_first_item(); - //tabs[selected_tab].body->set_selected_item(selected_item_index, false); + } else if(tabs[selected_tab].body->attach_side == AttachSide::TOP) { + int selected_item_index = tabs[selected_tab].body->get_selected_item(); + tabs[selected_tab].body->select_first_item(); + tabs[selected_tab].body->set_selected_item(selected_item_index, false); } } @@ -1641,7 +1641,7 @@ namespace QuickMedia { page_stack.push(current_page); select_episode(selected_item.get(), false); Body *chapters_body = tabs[selected_tab].body.get(); - chapters_body->filter_search_fuzzy(""); // Needed (or not really) to go to the next chapter when reaching the last page of a chapter + chapters_body->filter_search_fuzzy("", false); // Needed (or not really) to go to the next chapter when reaching the last page of a chapter MangaImagesPage *manga_images_page = static_cast(new_tabs[0].page.get()); window.setKeyRepeatEnabled(false); downloading_chapter_url.clear(); -- cgit v1.2.3