diff options
author | Andreas Kling <kling@serenityos.org> | 2020-08-28 21:29:59 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-28 21:29:59 +0200 |
commit | 64e448eef067862e90ff5763a47d6fcebd4ec213 (patch) | |
tree | 46ee1baa73edea4aa6e4ed9a6bb1411292d14df0 /Applications | |
parent | c3b24953204ef4fab62202a293768252c49e823e (diff) | |
download | serenity-64e448eef067862e90ff5763a47d6fcebd4ec213.zip |
Spreadsheet: Treat Return as a cursor key in the cell editing delegate
This allows you to enter many rows of cells like so:
1<return>2<return>3<return>...
Very cool! :^)
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/Spreadsheet/SpreadsheetView.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Applications/Spreadsheet/SpreadsheetView.h b/Applications/Spreadsheet/SpreadsheetView.h index 8d1e341b23..608493a4dd 100644 --- a/Applications/Spreadsheet/SpreadsheetView.h +++ b/Applications/Spreadsheet/SpreadsheetView.h @@ -62,6 +62,7 @@ private: case KeyCode::Key_Right: case KeyCode::Key_Up: case KeyCode::Key_Down: + case KeyCode::Key_Return: return true; default: return false; @@ -106,9 +107,6 @@ private: virtual RefPtr<Widget> create_widget() override { auto textbox = CellEditor::construct(); - textbox->on_return_pressed = [this] { - commit(); - }; textbox->on_escape_pressed = [this] { rollback(); }; |