]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Round the maximum depth on dive list
authorMiika Turkia <miika.turkia@gmail.com>
Fri, 9 Dec 2011 16:56:34 +0000 (18:56 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 9 Dec 2011 17:58:03 +0000 (09:58 -0800)
Round maximum depth on dive list to get consistent data between the dive
list and dive info.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
divelist.c

index de2d35df3b9d5a9a1ac103f51f3955943665e239..d311aee17a0de144dadbadc6eddfba90b261f16c 100644 (file)
@@ -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;