1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 08:07:44 +00:00

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

View file

@ -194,7 +194,7 @@ void SheetModel::set_data(const GUI::ModelIndex& index, const GUI::Variant& valu
void SheetModel::update() void SheetModel::update()
{ {
m_sheet->update(); m_sheet->update();
did_update(UpdateFlag::DontInvalidateIndices); did_update(UpdateFlag::DontInvalidateIndices | Model::UpdateFlag::DontResizeColumns);
} }
CellsUndoCommand::CellsUndoCommand(Vector<CellChange> cell_changes) CellsUndoCommand::CellsUndoCommand(Vector<CellChange> cell_changes)