mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mobile: when editing dives update the fulltext filter
In the mobile version of the dive-editing command, the fulltext filter was not updated. Thus, when editing a dive while the filter was active, the dive would disappear. Unregister the old and register the new version. Reported-by: Chirana Gheorghita Eugeniu Theodor <office@adaptcom.ro> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
76cab71b7c
commit
10a4225013
1 changed files with 4 additions and 1 deletions
|
@ -1248,8 +1248,11 @@ void EditDive::exchangeDives()
|
||||||
// it by swapping the dive data.
|
// it by swapping the dive data.
|
||||||
newDive->hidden_by_filter = oldDive->hidden_by_filter;
|
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);
|
std::swap(*newDive, *oldDive);
|
||||||
|
fulltext_register(oldDive);
|
||||||
invalidate_dive_cache(oldDive);
|
invalidate_dive_cache(oldDive);
|
||||||
|
|
||||||
// Changing times may have unsorted the dive and trip tables
|
// Changing times may have unsorted the dive and trip tables
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue