[PATCH] Round the maximum depth on dive list

Miika Turkia miika.turkia at gmail.com
Fri Dec 9 08:56:34 PST 2011


Round maximum depth on dive list to get consistent data between
the dive list and dive info.

Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
 divelist.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

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;
-- 
1.7.5.4



More information about the subsurface mailing list