Spreadsheet: Don't invalidate the model on set_data()

No previous model index will be invalidated afterwards, so avoid
invalidating them.
Also fixes an issue where committing to an edit with the inline cell
editor makes the focused cell switch to A0.
Fixes #9677.
This commit is contained in:
Ali Mohammad Pur 2021-08-30 20:28:52 +04:30 committed by Andreas Kling
parent 1f68b1f768
commit 04f02a5b9e
Notes: sideshowbarker 2024-07-18 05:05:23 +09:00

View file

@ -146,7 +146,7 @@ void SheetModel::set_data(const GUI::ModelIndex& index, const GUI::Variant& valu
auto& cell = m_sheet->ensure({ (size_t)index.column(), (size_t)index.row() });
cell.set_data(value.to_string());
invalidate();
did_update(UpdateFlag::DontInvalidateIndices);
}
void SheetModel::update()