diff options
author | Andreas Kling <kling@serenityos.org> | 2020-09-01 15:41:56 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-09-01 16:17:17 +0200 |
commit | 27e86c03da69507e6c38cb8a7a6384d721dbacf8 (patch) | |
tree | 8bcb5134f84ee74fe80df1b995157be2c3e0a9cd /Libraries/LibGUI/IconView.cpp | |
parent | 72443bd1abe8f773516d493dc5e2bf4b91d02573 (diff) | |
download | serenity-27e86c03da69507e6c38cb8a7a6384d721dbacf8.zip |
LibGUI: Implement the virtual IconView::scroll_into_view()
This is virtual in AbstractView so let's not shadow it with an IconView
specific variant.
Diffstat (limited to 'Libraries/LibGUI/IconView.cpp')
-rw-r--r-- | Libraries/LibGUI/IconView.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Libraries/LibGUI/IconView.cpp b/Libraries/LibGUI/IconView.cpp index 0d92e7fb89..26d3899341 100644 --- a/Libraries/LibGUI/IconView.cpp +++ b/Libraries/LibGUI/IconView.cpp @@ -62,9 +62,11 @@ void IconView::select_all() } } -void IconView::scroll_into_view(const ModelIndex& index, Orientation orientation) +void IconView::scroll_into_view(const ModelIndex& index, bool scroll_horizontally, bool scroll_vertically) { - ScrollableWidget::scroll_into_view(item_rect(index.row()), orientation); + if (!index.is_valid()) + return; + ScrollableWidget::scroll_into_view(item_rect(index.row()), scroll_horizontally, scroll_vertically); } void IconView::resize_event(ResizeEvent& event) |