mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add ability to make a dive computer the first dive computer of a dive
If a dive has multiple dive computers we enable a special context menu when the user right-clicks on the dive computer name AND is not already showing the first dive computer. In that case we offer to make the currently shown dive computer the first one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
419434f494
commit
a117428ff4
4 changed files with 68 additions and 2 deletions
3
dive.h
3
dive.h
|
|
@ -361,6 +361,7 @@ struct dive_table {
|
|||
extern struct dive_table dive_table;
|
||||
|
||||
extern int selected_dive;
|
||||
extern unsigned int dc_number;
|
||||
#define current_dive (get_dive(selected_dive))
|
||||
#define current_dc (get_dive_dc(current_dive, dc_number))
|
||||
|
||||
|
|
@ -405,6 +406,8 @@ static inline struct divecomputer *get_dive_dc(struct dive *dive, int nr)
|
|||
return dc;
|
||||
}
|
||||
|
||||
extern void make_first_dc(void);
|
||||
|
||||
/*
|
||||
* Iterate over each dive, with the first parameter being the index
|
||||
* iterator variable, and the second one being the dive one.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue