mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
undo: remove invalidate_dive_cache() call from make_first_dc()
The make_first_dc() function clones a dive with a certain dive computer moved to the front. This is used by the MoveDiveComputerToFront undo command. make_first_dc() calls invalidate_dive(). However, the undo command does that by itself on every undo/redo. Thus, remove the call in make_first_dc(). Aside from consistency, the goal is to move invalidate_dive() to command/* so that we can be more aggressive about the whole topic: Store only "const dive *" pointers and thus force any writing access to explicitly invalidate the dive cache. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
32ec9a8726
commit
cd32c280ae
1 changed files with 0 additions and 1 deletions
|
@ -3014,7 +3014,6 @@ struct dive *make_first_dc(const struct dive *d, int dc_number)
|
|||
|
||||
/* make a new unique id, since we still can't handle two equal ids */
|
||||
res->id = dive_getUniqID();
|
||||
invalidate_dive_cache(res);
|
||||
|
||||
if (dc_number == 0)
|
||||
return res;
|
||||
|
|
Loading…
Reference in a new issue