diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-05-17 22:22:55 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-05-20 21:23:16 -0700 |
commit | eba6e76b963115a77b5f8607bc6c3ea1040a466f (patch) | |
tree | e926eb7112a902561c1b66f4d6a342ec2a7134b5 /core/dive.h | |
parent | f0307abf50397da79671ce79707eb4ce1f78acd0 (diff) | |
download | subsurface-eba6e76b963115a77b5f8607bc6c3ea1040a466f.tar.gz |
Undo: make "move dive computer to front" undoable
Instead of the elegant solution that just modifies the dive,
keep two copies and add either the old or the new copy. This
is primitive, but it trivially keeps the dives in the right order.
The order might change on renumbering the dive computers.
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 7aea050b6..ebc127bd7 100644 --- a/core/dive.h +++ b/core/dive.h @@ -434,7 +434,7 @@ extern unsigned int number_of_computers(const struct dive *dive); extern struct divecomputer *get_dive_dc(struct dive *dive, int nr); extern timestamp_t dive_endtime(const struct dive *dive); -extern void make_first_dc(void); +extern struct dive *make_first_dc(const struct dive *d, int dc_number); extern unsigned int count_divecomputers(void); extern void delete_current_divecomputer(void); void split_divecomputer(const struct dive *src, int num, struct dive **out1, struct dive **out2); |