diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-03-16 23:10:47 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-03-17 16:50:38 -0700 |
commit | 219420bd6e1648596aa4a3324d3f39bb3d791be7 (patch) | |
tree | 3159513b272320d340b209fa9aa0e2ffb746c951 /commands | |
parent | 2da7b6d0f5ddb5eaa428a64c79f58fdbe9efda7a (diff) | |
download | subsurface-219420bd6e1648596aa4a3324d3f39bb3d791be7.tar.gz |
filter: update fulltext index when editing dive
In edit commands, the fulltext might have changed and therefore
we have to update the fulltext index.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/command_edit.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/commands/command_edit.cpp b/commands/command_edit.cpp index 6a5e165be..32c478845 100644 --- a/commands/command_edit.cpp +++ b/commands/command_edit.cpp @@ -2,6 +2,7 @@ #include "command_edit.h" #include "core/divelist.h" +#include "core/fulltext.h" #include "core/qthelper.h" // for copy_qstring #include "core/selection.h" #include "core/subsurface-string.h" @@ -108,6 +109,7 @@ void EditBase<T>::undo() for (dive *d: dives) { set(d, value); + fulltext_register(d); // Update the fulltext cache invalidate_dive_cache(d); // Ensure that dive is written in git_save() } @@ -678,8 +680,9 @@ void EditTagsBase::undo() if (!tags.contains(tag)) tags.push_back(tag); } - invalidate_dive_cache(d); // Ensure that dive is written in git_save() set(d, tags); + fulltext_register(d); // Update the fulltext cache + invalidate_dive_cache(d); // Ensure that dive is written in git_save() } std::swap(tagsToAdd, tagsToRemove); |