diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-07-21 18:28:33 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-11 16:22:27 -0700 |
commit | 014c04f8bd30740e7711f3b3a01619fd27b5b613 (patch) | |
tree | 0f7e505cc36e377bed4e24fb6f94adc93db22fb2 /core/dive.h | |
parent | 302f6adb79681da3fe53336f1e4c7525f46fd47d (diff) | |
download | subsurface-014c04f8bd30740e7711f3b3a01619fd27b5b613.tar.gz |
Undo: implement rudimentary support for undo of dive-merging
For this, an output-parameter was added to the backend merge_dives()
function. When non-zero, instead of adding the merged dive to
the preferred trip, the preferred trip is returned to the caller.
Since the new UndoObject, just like the delete-dives UndoObject,
needs to remove/readd a set of dives, the corresponding functionality
was split-off in a helper function.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/dive.h')
-rw-r--r-- | core/dive.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/dive.h b/core/dive.h index 340bc7ec8..6fd53fba9 100644 --- a/core/dive.h +++ b/core/dive.h @@ -573,7 +573,7 @@ extern int split_dive_dont_insert(const struct dive *dive, struct dive **new1, s extern void split_dive(struct dive *); extern int split_dive_at_time_dont_insert(const struct dive *dive, duration_t time, struct dive **new1, struct dive **new2); extern void split_dive_at_time(struct dive *dive, duration_t time); -extern struct dive *merge_dives(struct dive *a, struct dive *b, int offset, bool prefer_downloaded); +extern struct dive *merge_dives(struct dive *a, struct dive *b, int offset, bool prefer_downloaded, struct dive_trip **trip); extern struct dive *try_to_merge(struct dive *a, struct dive *b, bool prefer_downloaded); extern struct event *clone_event(const struct event *src_ev); extern void copy_events(const struct divecomputer *s, struct divecomputer *d); |