summaryrefslogtreecommitdiff
path: root/Userland/Applications
diff options
context:
space:
mode:
authorTim Ledbetter <timledbetter@gmail.com>2023-02-09 19:38:50 +0000
committerAli Mohammad Pur <Ali.mpfard@gmail.com>2023-02-10 05:12:06 +0330
commitd32961777bcea26ed7ec96936f53cb080da3fb75 (patch)
tree7ebaf4fa9c58a418ed9dbb0dd01bae322d464f69 /Userland/Applications
parent59855e49df5fae6717bcb7b104063a40634c8fad (diff)
downloadserenity-d32961777bcea26ed7ec96936f53cb080da3fb75.zip
Spreadsheet: Don't recalculate column sizes when no data has changed
Use the Model::UpdateFlag::DontResizeColumns option when performing a model update where no data has been changed. This improves navigation performance on large spreadsheets.
Diffstat (limited to 'Userland/Applications')
-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 c19de77117..df3607687f 100644
--- a/Userland/Applications/Spreadsheet/SpreadsheetModel.cpp
+++ b/Userland/Applications/Spreadsheet/SpreadsheetModel.cpp
@@ -194,7 +194,7 @@ void SheetModel::set_data(const GUI::ModelIndex& index, const GUI::Variant& valu
void SheetModel::update()
{
m_sheet->update();
- did_update(UpdateFlag::DontInvalidateIndices);
+ did_update(UpdateFlag::DontInvalidateIndices | Model::UpdateFlag::DontResizeColumns);
}
CellsUndoCommand::CellsUndoCommand(Vector<CellChange> cell_changes)