summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-08-28 21:03:09 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-28 21:03:09 +0200
commitcd930e0f3db7d3007e21b3b9db154328d737f117 (patch)
tree2d1cae35c1ff6db11f30013991ec355f7b37c62a /Applications
parent70d3dd5b8728d6cf12659259fb382442458c1789 (diff)
downloadserenity-cd930e0f3db7d3007e21b3b9db154328d737f117.zip
Spreadsheet: Make Return move the cursor one step down
This seems to be a common behavior in spreadsheet applications, so let's replicate it here by hooking the activation signal.
Diffstat (limited to 'Applications')
-rw-r--r--Applications/Spreadsheet/SpreadsheetView.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Applications/Spreadsheet/SpreadsheetView.cpp b/Applications/Spreadsheet/SpreadsheetView.cpp
index 733f9b7597..aab787751b 100644
--- a/Applications/Spreadsheet/SpreadsheetView.cpp
+++ b/Applications/Spreadsheet/SpreadsheetView.cpp
@@ -102,6 +102,10 @@ SpreadsheetView::SpreadsheetView(Sheet& sheet)
m_table_view->update();
};
};
+
+ m_table_view->on_activation = [this](auto&) {
+ m_table_view->move_cursor(GUI::AbstractView::CursorMovement::Down, GUI::AbstractView::SelectionUpdate::Set);
+ };
}
void SpreadsheetView::hide_event(GUI::HideEvent&)