From ca2c81251a7d036f586f3d0a32bc35e2b9f93144 Mon Sep 17 00:00:00 2001 From: sin-ack Date: Tue, 25 May 2021 14:13:19 +0000 Subject: Everywhere: Replace Model::update() with Model::invalidate() Most of the models were just calling did_update anyway, which is pointless since it can be unified to the base Model class. Instead, code calling update() will now call invalidate(), which functions identically and is more obvious in what it does. Additionally, a default implementation is provided, which removes the need to add empty implementations of update() for each model subclass. Co-Authored-By: Ali Mohammad Pur --- Userland/Applications/Spreadsheet/SpreadsheetView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/Applications/Spreadsheet/SpreadsheetView.cpp') diff --git a/Userland/Applications/Spreadsheet/SpreadsheetView.cpp b/Userland/Applications/Spreadsheet/SpreadsheetView.cpp index 97cc81b258..f412dbfa28 100644 --- a/Userland/Applications/Spreadsheet/SpreadsheetView.cpp +++ b/Userland/Applications/Spreadsheet/SpreadsheetView.cpp @@ -144,7 +144,7 @@ void InfinitelyScrollableTableView::mouseup_event(GUI::MouseEvent& event) void SpreadsheetView::update_with_model() { - m_table_view->model()->update(); + m_table_view->model()->invalidate(); m_table_view->update(); } -- cgit v1.2.3