mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
undo: implement renaming of events
There is a slight complexity here owing to the fact that the profile works on a copy of the current dive: We get a copy of the event and have to search for the original event in the current dive. This could be done in the undo command. Nevertheless, here we do it in the profile so that when in the future the profile can work on a non-copied dive we can simply remove this function. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
f9fe6d759f
commit
ab8e317b28
7 changed files with 87 additions and 10 deletions
|
|
@ -378,7 +378,10 @@ extern bool is_cylinder_used(const struct dive *dive, int idx);
|
|||
extern bool is_cylinder_prot(const struct dive *dive, int idx);
|
||||
extern void add_gas_switch_event(struct dive *dive, struct divecomputer *dc, int time, int idx);
|
||||
extern struct event *create_event(unsigned int time, int type, int flags, int value, const char *name);
|
||||
extern struct event *clone_event_rename(const struct event *ev, const char *name);
|
||||
extern void add_event_to_dc(struct divecomputer *dc, struct event *ev);
|
||||
extern void swap_event(struct divecomputer *dc, struct event *from, struct event *to);
|
||||
extern bool same_event(const struct event *a, const struct event *b);
|
||||
extern struct event *add_event(struct divecomputer *dc, unsigned int time, int type, int flags, int value, const char *name);
|
||||
extern void remove_event_from_dc(struct divecomputer *dc, struct event *event);
|
||||
extern void remove_event(const struct event *event);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue