From b6d0849845b87df7b8d733befc9773752aa08f53 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 28 May 2021 19:35:11 +0200 Subject: Fix 4chan page scroll after navigating to reply --- src/QuickMedia.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index db03aac..4b81b7b 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -3514,10 +3514,7 @@ namespace QuickMedia { comment_navigation_stack.push(thread_body->get_selected_item()); comment_page_scroll_stack.push(thread_body->get_page_scroll()); //thread_body->clamp_selection(); - //thread_body->set_page_scroll(0.0f); - int prev_sel = thread_body->get_selected_item(); - thread_body->select_first_item(); - thread_body->set_selected_item(prev_sel, false); + thread_body->set_page_scroll(0.0f); } else if(event.key.code == sf::Keyboard::BackSpace && !comment_navigation_stack.empty()) { size_t previous_selected = comment_navigation_stack.top(); float previous_page_scroll = comment_page_scroll_stack.top(); @@ -4857,8 +4854,6 @@ namespace QuickMedia { sf::Vertex gradient_points[4]; double gradient_inc = 0; - //tabs[MESSAGES_TAB_INDEX].body->set_page_scroll(window_size.y); - bool fetched_enough_messages = false; auto fetch_more_previous_messages_if_needed = [this, &tabs, ¤t_room, &fetched_enough_messages, &previous_messages_future, MESSAGES_TAB_INDEX]() { -- cgit v1.2.3