diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-10-30 21:46:01 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-12-29 08:34:09 -0800 |
commit | 9e84fd935bd68ef667426d92f3c27b3aab58649a (patch) | |
tree | dd8ce62d0968bdf390b60d00199f0cf44240b4f5 /commands | |
parent | e80c0d2c60e53071632095322845c32c80767f6f (diff) | |
download | subsurface-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')
-rw-r--r-- | commands/command_divelist.cpp | 3 |
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 |