1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 02:13:56 +09:00

LibGUI: Make descendants of AbstractView define their own select_all() (#1201)

AbstractView does not know which column it's displaying which makes it
impossible to implement the select_all functionality up there. Now
descendants override the pure virtual select_all method and implement
it themselves.
This commit is contained in:
DAlperin 2020-02-25 10:03:15 -05:00 committed by GitHub
parent 6824cb17a6
commit 8e1645423f
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
Notes: sideshowbarker 2024-07-19 09:04:07 +09:00
10 changed files with 54 additions and 14 deletions

View file

@ -48,6 +48,15 @@ AbstractTableView::~AbstractTableView()
{
}
void AbstractTableView::select_all()
{
selection().clear();
for (int item_index = 0; item_index < item_count(); ++item_index) {
auto index = model()->index(item_index);
selection().add(index);
}
}
void AbstractTableView::update_column_sizes()
{
if (!m_size_columns_to_fit_content)