1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 12:54:58 +00:00

LibGUI: TableView should only scroll to the selected cell

Fixes #3825
This commit is contained in:
Tom 2020-10-23 10:27:08 -06:00 committed by Andreas Kling
parent 3c5da01f94
commit a19d8aade4

View file

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