From ebcbe5aedd6188d2dce0cc9dee37daaaab4e8b05 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 9 Feb 2013 07:41:15 -0800 Subject: Finish removing accesses to first divecomputer instead of dive This adds watertemp and airtemp to the dive, populates them in fixup and uses them elsewhere in the code. WARNING: as a sideeffect we now edit the airtemp in the dive, but we never display this in the DIve Info notebook (as that always displays the data from the specific selected divecomputer). This is likely to cause confusion. It's consistent behavior, but... odd. This brings back the desire to have a view of "best data available" for a dive, in addition to the "per divecomputer" view. This would also allow us to consolidate the different pressure graphs we may be getting from different divecomputers (consider the case where you dive with multiple air integrated computers that are connected to different tanks - now we could have one profile with all the correct tank pressure plots overlayed - and the best available (or edited) data in the corresponding Dive Info notebook. This commit also fixes a few remaining accesses to the first divecomputer that fell through the cracks earlier and does a couple of other related cleanups. Signed-off-by: Dirk Hohndel --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 170481035..a22524f29 100644 --- a/main.c +++ b/main.c @@ -172,8 +172,8 @@ void report_dives(gboolean is_imported, gboolean prefer_imported) /* only try to merge overlapping dives - or if one of the dives has * zero duration (that might be a gps marker from the webservice) */ - if (prev->dc.duration.seconds && dive->dc.duration.seconds && - prev->when + prev->dc.duration.seconds < dive->when) + if (prev->duration.seconds && dive->duration.seconds && + prev->when + prev->duration.seconds < dive->when) continue; merged = try_to_merge(prev, dive, prefer_imported); -- cgit v1.2.3-70-g09d2