From 6131dbc74c700ce1983740034ffb5e6d9b4bc54f Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Fri, 9 Dec 2011 18:56:34 +0200 Subject: [PATCH] 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 --- divelist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.43.0