From a19d8aade4862556db8b2e653b05f6a4b328e18c Mon Sep 17 00:00:00 2001 From: Tom Date: Fri, 23 Oct 2020 10:27:08 -0600 Subject: [PATCH] LibGUI: TableView should only scroll to the selected cell Fixes #3825 --- Libraries/LibGUI/AbstractTableView.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Libraries/LibGUI/AbstractTableView.cpp b/Libraries/LibGUI/AbstractTableView.cpp index bc96785de16..97102f34998 100644 --- a/Libraries/LibGUI/AbstractTableView.cpp +++ b/Libraries/LibGUI/AbstractTableView.cpp @@ -239,8 +239,7 @@ void AbstractTableView::move_cursor_relative(int vertical_steps, int horizontal_ void AbstractTableView::scroll_into_view(const ModelIndex& index, bool scroll_horizontally, bool scroll_vertically) { - auto rect = row_rect(index.row()).translated(0, -m_column_header->height()); - ScrollableWidget::scroll_into_view(rect, scroll_horizontally, scroll_vertically); + ScrollableWidget::scroll_into_view(content_rect(index), scroll_horizontally, scroll_vertically); } void AbstractTableView::doubleclick_event(MouseEvent& event)