summaryrefslogtreecommitdiff
path: root/Userland/Applications/Spreadsheet/SpreadsheetModel.cpp
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2021-08-30 20:28:52 +0430
committerAndreas Kling <kling@serenityos.org>2021-08-30 18:29:33 +0200
commit04f02a5b9ec633f2f87f535d59201941c6df1252 (patch)
tree760f3e1780ce082c2b676f5884db4407986e6804 /Userland/Applications/Spreadsheet/SpreadsheetModel.cpp
parent1f68b1f76826f2b89edfe036f07e2067803b2bc6 (diff)
downloadserenity-04f02a5b9ec633f2f87f535d59201941c6df1252.zip
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.
Diffstat (limited to 'Userland/Applications/Spreadsheet/SpreadsheetModel.cpp')
-rw-r--r--Userland/Applications/Spreadsheet/SpreadsheetModel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Applications/Spreadsheet/SpreadsheetModel.cpp b/Userland/Applications/Spreadsheet/SpreadsheetModel.cpp
index fdd11865f7..1b2558464b 100644
--- a/Userland/Applications/Spreadsheet/SpreadsheetModel.cpp
+++ b/Userland/Applications/Spreadsheet/SpreadsheetModel.cpp
@@ -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()