1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 17:55:06 +00:00

LibGUI: Move editing key handling up to AbstractView

We want all views to respond to the editing key as long as the relevant
edit trigger is activated.
This commit is contained in:
Andreas Kling 2020-09-24 11:42:11 +02:00
parent ece555b684
commit f52527ef9c
3 changed files with 8 additions and 16 deletions

View file

@ -166,14 +166,6 @@ void TableView::keydown_event(KeyEvent& event)
if (!model())
return;
if (event.key() == KeyCode::Key_F2) {
if (is_editable() && edit_triggers() & EditTrigger::EditKeyPressed) {
begin_editing(cursor_index());
event.accept();
return;
}
}
if (event.key() == KeyCode::Key_Return) {
activate(cursor_index());
return;