mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-13 04:52:23 +00:00
Spreadsheet: Clear the cell and commit when the delete key is pressed
...as the initial stroke that begins an edit. This is still imperfect, as it completely ignores selections. Fixes #4168 (sort of).
This commit is contained in:
parent
b66f3166cb
commit
a20f1202a8
Notes:
sideshowbarker
2024-07-19 01:09:22 +09:00
Author: https://github.com/alimpfard
Commit: a20f1202a8
Pull-request: https://github.com/SerenityOS/serenity/pull/4177
Issue: https://github.com/SerenityOS/serenity/issues/4167
Issue: https://github.com/SerenityOS/serenity/issues/4168
Issue: https://github.com/SerenityOS/serenity/issues/4170
Issue: https://github.com/SerenityOS/serenity/issues/4171
Reviewed-by: https://github.com/awesomekling
1 changed files with 6 additions and 0 deletions
|
@ -47,6 +47,12 @@ SpreadsheetView::~SpreadsheetView()
|
|||
|
||||
void SpreadsheetView::EditingDelegate::set_value(const GUI::Variant& value)
|
||||
{
|
||||
if (value.as_string().is_null()) {
|
||||
StringModelEditingDelegate::set_value("");
|
||||
commit();
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_has_set_initial_value)
|
||||
return StringModelEditingDelegate::set_value(value);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue