From a4e3ae0ee9845295516b7bf817dc9eb3d8c45395 Mon Sep 17 00:00:00 2001 From: kimlintu Date: Sun, 6 Mar 2022 11:44:33 +0100 Subject: [PATCH] Help: Remove redundant selection update when opening page Since the selection already gets updated in AbstractView::keydown_event and AbstractView::mousedown_event we don't have to update it again in the MainWidget::open_url function. This fixes a bug that causes the selection to "spaz out" when scrolling too fast between pages. --- Userland/Applications/Help/MainWidget.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Userland/Applications/Help/MainWidget.cpp b/Userland/Applications/Help/MainWidget.cpp index a375a4c4e4..9429864202 100644 --- a/Userland/Applications/Help/MainWidget.cpp +++ b/Userland/Applications/Help/MainWidget.cpp @@ -292,7 +292,6 @@ void MainWidget::open_url(URL const& url) auto browse_view_index = m_manual_model->index_from_path(path); if (browse_view_index.has_value()) { m_browse_view->expand_tree(browse_view_index.value().parent()); - m_browse_view->selection().set(browse_view_index.value()); String page_and_section = m_manual_model->page_and_section(browse_view_index.value()); window()->set_title(String::formatted("{} - Help", page_and_section));