diff options
-rw-r--r-- | Libraries/LibGUI/AbstractView.cpp | 8 | ||||
-rw-r--r-- | Libraries/LibGUI/IconView.cpp | 8 | ||||
-rw-r--r-- | Libraries/LibGUI/TableView.cpp | 8 |
3 files changed, 8 insertions, 16 deletions
diff --git a/Libraries/LibGUI/AbstractView.cpp b/Libraries/LibGUI/AbstractView.cpp index 9c3c9c49df..00829c94d3 100644 --- a/Libraries/LibGUI/AbstractView.cpp +++ b/Libraries/LibGUI/AbstractView.cpp @@ -447,6 +447,14 @@ void AbstractView::set_edit_triggers(unsigned triggers) void AbstractView::keydown_event(KeyEvent& event) { + if (event.key() == KeyCode::Key_F2) { + if (is_editable() && edit_triggers() & EditTrigger::EditKeyPressed) { + begin_editing(cursor_index()); + event.accept(); + return; + } + } + SelectionUpdate selection_update = SelectionUpdate::Set; if (event.modifiers() == KeyModifier::Mod_Shift) { selection_update = SelectionUpdate::Shift; diff --git a/Libraries/LibGUI/IconView.cpp b/Libraries/LibGUI/IconView.cpp index 42a7498d43..d1afb19ed6 100644 --- a/Libraries/LibGUI/IconView.cpp +++ b/Libraries/LibGUI/IconView.cpp @@ -610,14 +610,6 @@ void IconView::keydown_event(KeyEvent& event) if (!m_visual_row_count || !m_visual_column_count) 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_selected(); return; diff --git a/Libraries/LibGUI/TableView.cpp b/Libraries/LibGUI/TableView.cpp index 02c855c922..2000e43ef4 100644 --- a/Libraries/LibGUI/TableView.cpp +++ b/Libraries/LibGUI/TableView.cpp @@ -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; |