diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-11 11:19:09 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-11 08:42:17 -0800 |
commit | 32ec9a8726ae6d12a742132a3d3140b6f6b0b4cc (patch) | |
tree | 185b4250ecdbb4a2d6e6027c758bdd3c529c4015 /desktop-widgets | |
parent | 5692f0d68aa1224cce7f2f25e66b8dd8663f2d66 (diff) | |
download | subsurface-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.cpp | 4 |
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); } |