aboutsummaryrefslogtreecommitdiffstats
path: root/core/divelist.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/divelist.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/divelist.h')
-rw-r--r--core/divelist.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/divelist.h b/core/divelist.h
index 3687b0881..2b2ee07a5 100644
--- a/core/divelist.h
+++ b/core/divelist.h
@@ -42,6 +42,7 @@ extern void find_new_trip_start_time(dive_trip_t *trip);
extern struct dive *first_selected_dive();
extern struct dive *last_selected_dive();
extern bool is_trip_before_after(const struct dive *dive, bool before);
+extern int get_dive_nr_at_idx(int idx);
extern void set_dive_nr_for_current_dive();
extern timestamp_t get_surface_interval(timestamp_t when);
extern void delete_dive_from_table(struct dive_table *table, int idx);