mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00: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:
@@ -125,18 +125,6 @@ void AbstractView::stop_editing()
|
||||
}
|
||||
}
|
||||
|
||||
void AbstractView::select_all()
|
||||
{
|
||||
ASSERT(model());
|
||||
int rows = model()->row_count();
|
||||
int columns = model()->column_count();
|
||||
|
||||
for (int i = 0; i < rows; ++i) {
|
||||
for (int j = 0; j < columns; ++j)
|
||||
selection().add(model()->index(i, j));
|
||||
}
|
||||
}
|
||||
|
||||
void AbstractView::activate(const ModelIndex& index)
|
||||
{
|
||||
if (on_activation)
|
||||
|
||||
Reference in New Issue
Block a user