1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:37:45 +00:00

Spreadsheet: Keep value when clicking out of a cell

This commit is contained in:
Brandon Hamilton 2021-05-31 11:01:23 +02:00 committed by Ali Mohammad Pur
parent 73b9cfac1b
commit 6219c3ec3c
2 changed files with 7 additions and 0 deletions

View file

@ -124,10 +124,14 @@ private:
commit();
on_cursor_key_pressed(event);
};
textbox->on_focusout = [this] {
on_cell_focusout(index(), value());
};
return textbox;
}
Function<void(GUI::KeyEvent&)> on_cursor_key_pressed;
Function<void(const GUI::ModelIndex&, const GUI::Variant&)> on_cell_focusout;
private:
bool m_has_set_initial_value { false };