mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add maxdepth back to the dive structure
Populate during dive fixup as the maximum depth shown by all the divecomputers. Use this value (instead of the one in the first divecomputer) in printing, statistics, etc. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b8c7992bbf
commit
1511271201
6 changed files with 19 additions and 17 deletions
10
divelist.c
10
divelist.c
|
@ -55,7 +55,7 @@ enum {
|
|||
DIVE_NR, /* int: dive->nr */
|
||||
DIVE_DATE, /* timestamp_t: dive->when */
|
||||
DIVE_RATING, /* int: 0-5 stars */
|
||||
DIVE_DEPTH, /* int: dive->dc.maxdepth in mm */
|
||||
DIVE_DEPTH, /* int: dive->maxdepth in mm */
|
||||
DIVE_DURATION, /* int: in seconds */
|
||||
DIVE_TEMPERATURE, /* int: in mkelvin */
|
||||
DIVE_TOTALWEIGHT, /* int: in grams */
|
||||
|
@ -1317,7 +1317,7 @@ static void fill_dive_list(void)
|
|||
DIVE_INDEX, i,
|
||||
DIVE_NR, dive->number,
|
||||
DIVE_DATE, dive->when,
|
||||
DIVE_DEPTH, dive->dc.maxdepth,
|
||||
DIVE_DEPTH, dive->maxdepth,
|
||||
DIVE_DURATION, get_duration_in_sec(dive),
|
||||
DIVE_LOCATION, dive->location,
|
||||
DIVE_LOC_ICON, icon,
|
||||
|
@ -1330,7 +1330,7 @@ static void fill_dive_list(void)
|
|||
DIVE_INDEX, i,
|
||||
DIVE_NR, dive->number,
|
||||
DIVE_DATE, dive->when,
|
||||
DIVE_DEPTH, dive->dc.maxdepth,
|
||||
DIVE_DEPTH, dive->maxdepth,
|
||||
DIVE_DURATION, get_duration_in_sec(dive),
|
||||
DIVE_LOCATION, dive->location,
|
||||
DIVE_LOC_ICON, icon,
|
||||
|
@ -1673,7 +1673,7 @@ static int copy_tree_node(GtkTreeIter *a, GtkTreeIter *b)
|
|||
DIVE_NR, &store_dive.number,
|
||||
DIVE_DATE, &store_dive.when,
|
||||
DIVE_RATING, &store_dive.rating,
|
||||
DIVE_DEPTH, &store_dive.dc.maxdepth,
|
||||
DIVE_DEPTH, &store_dive.maxdepth,
|
||||
DIVE_DURATION, &store_dive.dc.duration,
|
||||
DIVE_TEMPERATURE, &store_dive.dc.watertemp.mkelvin,
|
||||
DIVE_TOTALWEIGHT, &totalweight,
|
||||
|
@ -1690,7 +1690,7 @@ static int copy_tree_node(GtkTreeIter *a, GtkTreeIter *b)
|
|||
DIVE_NR, store_dive.number,
|
||||
DIVE_DATE, store_dive.when,
|
||||
DIVE_RATING, store_dive.rating,
|
||||
DIVE_DEPTH, store_dive.dc.maxdepth,
|
||||
DIVE_DEPTH, store_dive.maxdepth,
|
||||
DIVE_DURATION, store_dive.dc.duration,
|
||||
DIVE_TEMPERATURE, store_dive.dc.watertemp.mkelvin,
|
||||
DIVE_TOTALWEIGHT, totalweight,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue