summaryrefslogtreecommitdiffstats
path: root/commands/command_divelist.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-10-30 21:46:01 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-12-29 08:34:09 -0800
commit9e84fd935bd68ef667426d92f3c27b3aab58649a (patch)
treedd8ce62d0968bdf390b60d00199f0cf44240b4f5 /commands/command_divelist.cpp
parente80c0d2c60e53071632095322845c32c80767f6f (diff)
downloadsubsurface-9e84fd935bd68ef667426d92f3c27b3aab58649a.tar.gz
filter: keep track on shown_dive on dive removal in DiveFilter
When removing dives, the UndoCommands would keep track of the shown dives. When adding, they were calling into the filter instead. Let's remove this asymmetry. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'commands/command_divelist.cpp')
-rw-r--r--commands/command_divelist.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/commands/command_divelist.cpp b/commands/command_divelist.cpp
index 262197214..36d4cdcf3 100644
--- a/commands/command_divelist.cpp
+++ b/commands/command_divelist.cpp
@@ -48,8 +48,7 @@ DiveToAdd DiveListBase::removeDive(struct dive *d, std::vector<OwningTripPtr> &t
if (idx < 0)
qWarning("Deletion of unknown dive!");
- if (!d->hidden_by_filter)
- --shown_dives;
+ DiveFilter::instance()->diveRemoved(d);
res.dive.reset(unregister_dive(idx)); // Remove dive from backend