mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
LibGUI: Move keyboard item activation up to AbstractView
All views want the same behavior, so move this to the base class. :^)
This commit is contained in:
parent
d8553a6406
commit
d3adbed231
8 changed files with 9 additions and 40 deletions
|
@ -603,20 +603,6 @@ void IconView::set_selection(const ModelIndex& new_index)
|
|||
AbstractView::set_selection(new_index);
|
||||
}
|
||||
|
||||
void IconView::keydown_event(KeyEvent& event)
|
||||
{
|
||||
if (!model())
|
||||
return;
|
||||
if (!m_visual_row_count || !m_visual_column_count)
|
||||
return;
|
||||
|
||||
if (event.key() == KeyCode::Key_Return) {
|
||||
activate_selected();
|
||||
return;
|
||||
}
|
||||
AbstractView::keydown_event(event);
|
||||
}
|
||||
|
||||
void IconView::move_cursor(CursorMovement movement, SelectionUpdate selection_update)
|
||||
{
|
||||
if (!model())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue