summaryrefslogtreecommitdiffstats
path: root/core/dive.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-07-19 22:35:25 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-11 16:22:27 -0700
commit12df9faaa2037b5155ebb84a7f6f6102491a0091 (patch)
tree33dcf0e400f669d088f1b20652e9c0c6f69aae2b /core/dive.h
parent61467ea0d59b04f141a68452ee16c70760421d72 (diff)
downloadsubsurface-12df9faaa2037b5155ebb84a7f6f6102491a0091.tar.gz
Undo: implement undo of manual dive-creation
Play manual addition of dives via an UndoCommand. Since this does in large parts the same thing as undo/redo of dive deletion (just the other way round and only a single instead of multiple dive), factor out the functions that add/delete dives and take care of trips. The UI-interaction is just mindless copy&paste and will have to be adapted. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/dive.h')
-rw-r--r--core/dive.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/dive.h b/core/dive.h
index f80412a03..2d3edbc5c 100644
--- a/core/dive.h
+++ b/core/dive.h
@@ -418,6 +418,7 @@ extern void add_dive_to_trip(struct dive *, dive_trip_t *);
struct dive *unregister_dive(int idx);
extern void delete_single_dive(int idx);
+extern int dive_get_insertion_index(struct dive *dive);
extern void add_single_dive(int idx, struct dive *dive);
extern void insert_trip(dive_trip_t **trip);