[PATCH] Use same weight in dive list and equipment list

Benjamin nystire at gmail.com
Fri Oct 4 11:39:33 UTC 2013


I'm not sure where to put the helper function. I hope that qthelper.* is an
appropriate place. If not, where should such functions go?

Benjamin


On 4 October 2013 19:39, Dirk Hohndel <dirk at hohndel.org> wrote:

> On Fri, 2013-10-04 at 15:49 +0300, Benjamin wrote:
> > Fix for issue 178 - lead weight shown differs
> > Subsurface stores all weights in grams. When displaying lbs, the dive
> > list was truncating the converted value at the decimal place, while
> > the equipment list was rounding the value up. Both of them now round
> > the value up to the nearest integer value when showing lbs.
> >
> >
> > Would it be better to add another function to do this, or is it ok to
> > have the same code twice? To put it differently,  are there any other
> > places where this conversion might be needed?
> >
>
> Putting things like this in helper functions is always a good idea.
>
> I took the patch as is - feel free to submit another one that adds
> helper functions.
>
> /D
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20131004/a3a91918/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-a-helper-function-to-calculate-weight-display-st.patch
Type: application/octet-stream
Size: 3195 bytes
Desc: not available
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20131004/a3a91918/attachment.obj>


More information about the subsurface mailing list