From f9cb526c969488e6a12d7fe2baf4a71417521460 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 22 Oct 2011 18:12:30 +0300 Subject: Add cylinder data to cylinder model as we record each dive This way the cylinder model list will contain all the different cylinders that we have ever seen, rather than only containing the models that we have *edited*. That makes it much more practical to add new dives with the same cylinders that we've used before, because now those cylinders will show up as cylinder models even if we haven't looked and edited the old dives first. Signed-off-by: Linus Torvalds --- dive.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dive.c') diff --git a/dive.c b/dive.c index 0341d0992..9edf36c91 100644 --- a/dive.c +++ b/dive.c @@ -240,6 +240,11 @@ struct dive *fixup_dive(struct dive *dive) update_temperature(&dive->watertemp, mintemp); update_depth(&dive->maxdepth, maxdepth); + for (i = 0; i < MAX_CYLINDERS; i++) { + cylinder_type_t *type = &dive->cylinder[i].type; + add_cylinder_description(type); + } + return dive; } -- cgit v1.2.3-70-g09d2