mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-25 14:05:15 +00:00
LibGUI: Scroll AbstractView to top on model change
This commit is contained in:
parent
1d9a7b5143
commit
57464be8f1
Notes:
sideshowbarker
2024-07-19 07:35:52 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/57464be8f15
1 changed files with 1 additions and 0 deletions
|
@ -56,6 +56,7 @@ void AbstractView::set_model(RefPtr<Model> model)
|
||||||
if (m_model)
|
if (m_model)
|
||||||
m_model->register_view({}, *this);
|
m_model->register_view({}, *this);
|
||||||
did_update_model(GUI::Model::InvalidateAllIndexes);
|
did_update_model(GUI::Model::InvalidateAllIndexes);
|
||||||
|
scroll_to_top();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractView::did_update_model(unsigned flags)
|
void AbstractView::did_update_model(unsigned flags)
|
||||||
|
|
Loading…
Add table
Reference in a new issue