1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:38:10 +00:00

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.
This commit is contained in:
kimlintu 2022-03-06 11:44:33 +01:00 committed by Linus Groh
parent 97c0a8c063
commit a4e3ae0ee9

View file

@ -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));