mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibGUI: Fix scroll_into_view flipping between left/top and right/bottom
This fixes flipping between left/top and right/bottom when the rectangle to make visible doesn't fit into the visible portion each time the function is called.
This commit is contained in:
@@ -438,10 +438,8 @@ void AbstractView::set_cursor(ModelIndex index, SelectionUpdate selection_update
|
||||
|
||||
m_cursor_index = index;
|
||||
|
||||
if (scroll_cursor_into_view) {
|
||||
// FIXME: We should scroll into view both vertically *and* horizontally.
|
||||
scroll_into_view(index, false, true);
|
||||
}
|
||||
if (scroll_cursor_into_view)
|
||||
scroll_into_view(index, true, true);
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user