From: Miika Turkia Date: Fri, 9 Dec 2011 16:56:34 +0000 (+0200) Subject: Round the maximum depth on dive list X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=6131dbc74c700ce1983740034ffb5e6d9b4bc54f;p=ext%2Fsubsurface.git Round the maximum depth on dive list Round maximum depth on dive list to get consistent data between the dive list and dive info. Signed-off-by: Miika Turkia Signed-off-by: Linus Torvalds --- diff --git a/divelist.c b/divelist.c index de2d35d..d311aee 100644 --- a/divelist.c +++ b/divelist.c @@ -160,8 +160,9 @@ static void depth_data_func(GtkTreeViewColumn *col, frac = depth % 10; if (integer < 20) break; + if (frac >= 5) + integer++; frac = -1; - /* Rounding? */ break; case FEET: integer = mm_to_feet(depth) + 0.5;