mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 10:24:59 +00:00
GAbstractView: Add function for adding all to selection
This commit is contained in:
parent
00596296c4
commit
7cf15bcb75
2 changed files with 13 additions and 0 deletions
|
@ -95,6 +95,18 @@ void GAbstractView::stop_editing()
|
|||
}
|
||||
}
|
||||
|
||||
void GAbstractView::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 GAbstractView::activate(const GModelIndex& index)
|
||||
{
|
||||
if (on_activation)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue