From 32ec9a8726ae6d12a742132a3d3140b6f6b0b4cc Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 11 Jan 2021 11:19:09 +0100 Subject: [PATCH] undo: remove invalidate_dive_cache call from MainTab When creating the RenumberDive undo command, the MainTab would manually call invalidate_dive_cache(). However, this is done on undo/redo, therefore the call can (should) be removed. Signed-off-by: Berthold Stoeger --- desktop-widgets/simplewidgets.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp index 689517c76..0b79dfe6d 100644 --- a/desktop-widgets/simplewidgets.cpp +++ b/desktop-widgets/simplewidgets.cpp @@ -34,10 +34,8 @@ void RenumberDialog::buttonClicked(QAbstractButton *button) int newNr = ui.spinBox->value(); struct dive *d; for_each_dive (i, d) { - if (!selectedOnly || d->selected) { - invalidate_dive_cache(d); + if (!selectedOnly || d->selected) renumberedDives.append({ d, newNr++ }); - } } Command::renumberDives(renumberedDives); }