From: Dirk Hohndel Date: Mon, 6 Aug 2012 21:03:24 +0000 (-0700) Subject: Fill the list of weightsystems from data in existing dives X-Git-Url: http://git.tdb.fi/?p=ext%2Fsubsurface.git;a=commitdiff_plain;h=39f606350b6025cb7c5cf9e657d7ef092eb026d7 Fill the list of weightsystems from data in existing dives This was simply an omission in the current implementation. All the plumbing was there but never got hooked up with the fixup_dive function as intended. Signed-off-by: Dirk Hohndel --- diff --git a/dive.c b/dive.c index 9f57aed..57a735c 100644 --- a/dive.c +++ b/dive.c @@ -472,6 +472,10 @@ struct dive *fixup_dive(struct dive *dive) if (same_rounded_pressure(cyl->sample_end, cyl->end)) cyl->end.mbar = 0; } + for (i = 0; i < MAX_WEIGHTSYSTEMS; i++) { + weightsystem_t *ws = dive->weightsystem + i; + add_weightsystem_description(ws); + } return dive; } diff --git a/dive.h b/dive.h index a25fafb..30894e5 100644 --- a/dive.h +++ b/dive.h @@ -338,6 +338,7 @@ extern void exit_ui(void); extern void report_error(GError* error); extern void add_cylinder_description(cylinder_type_t *); +extern void add_weightsystem_description(weightsystem_t *); extern void add_people(const char *string); extern void add_location(const char *string); extern void remember_event(const char *eventname);