summaryrefslogtreecommitdiff
path: root/Libraries/LibGUI/AbstractTableView.cpp
diff options
context:
space:
mode:
authorTom <tomut@yahoo.com>2020-10-23 10:27:08 -0600
committerAndreas Kling <kling@serenityos.org>2020-10-23 19:04:51 +0200
commita19d8aade4862556db8b2e653b05f6a4b328e18c (patch)
tree320e21b413c9c5799b02e63e8d15ef0c767d9ddc /Libraries/LibGUI/AbstractTableView.cpp
parent3c5da01f948caf298eb83d3ec6d8ff0192880d07 (diff)
downloadserenity-a19d8aade4862556db8b2e653b05f6a4b328e18c.zip
LibGUI: TableView should only scroll to the selected cell
Fixes #3825
Diffstat (limited to 'Libraries/LibGUI/AbstractTableView.cpp')
-rw-r--r--Libraries/LibGUI/AbstractTableView.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Libraries/LibGUI/AbstractTableView.cpp b/Libraries/LibGUI/AbstractTableView.cpp
index bc96785de1..97102f3499 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)