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 <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-01-11 11:19:09 +01:00 committed by Dirk Hohndel
parent 5692f0d68a
commit 32ec9a8726

View file

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