summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
Diffstat (limited to 'commands')
-rw-r--r--commands/command_edit.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/commands/command_edit.cpp b/commands/command_edit.cpp
index 194264531..c5f0e6a7a 100644
--- a/commands/command_edit.cpp
+++ b/commands/command_edit.cpp
@@ -1248,8 +1248,11 @@ void EditDive::exchangeDives()
// it by swapping the dive data.
newDive->hidden_by_filter = oldDive->hidden_by_filter;
- // Bluntly exchange dive data by shallow copy
+ // Bluntly exchange dive data by shallow copy.
+ // Don't forget to unregister the old and register the new dive!
+ fulltext_unregister(oldDive);
std::swap(*newDive, *oldDive);
+ fulltext_register(oldDive);
invalidate_dive_cache(oldDive);
// Changing times may have unsorted the dive and trip tables