aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-11 11:19:09 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-11 08:42:17 -0800
commit32ec9a8726ae6d12a742132a3d3140b6f6b0b4cc (patch)
tree185b4250ecdbb4a2d6e6027c758bdd3c529c4015 /desktop-widgets
parent5692f0d68aa1224cce7f2f25e66b8dd8663f2d66 (diff)
downloadsubsurface-32ec9a8726ae6d12a742132a3d3140b6f6b0b4cc.tar.gz
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>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/simplewidgets.cpp4
1 files changed, 1 insertions, 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);
}