소스 검색

LibGUI: TableView should only scroll to the selected cell

Fixes #3825
Tom 4 년 전
부모
커밋
a19d8aade4
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      Libraries/LibGUI/AbstractTableView.cpp

+ 1 - 2
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)