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.
This commit is contained in:
Tim Ledbetter 2023-02-09 19:38:50 +00:00 committed by Ali Mohammad Pur
parent 59855e49df
commit d32961777b
Notes: sideshowbarker 2024-07-17 00:35:35 +09:00

View file

@ -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)