[PATCH 2/2] Ticket #831 Fix

Dirk Hohndel dirk at hohndel.org
Mon Mar 9 10:36:20 PDT 2015


On Mon, Mar 09, 2015 at 06:48:52PM +0200, Yosef Hamza wrote:
> About patch -0002-
> 
> The thing is timeAxis->valueAt(scenePos) can return a negative value if the
> cursor was pointing to the negative part of the axis to the left, which is
> the case
> here.
> 
> The unsigned assigning happens at the very end of assigning series when
> assigned
> finally to duration_t of event which is uint32_t.

That is correct, but the commit message talks about unsigned comparison,
right? It's a good practice to try to have clear and precise commit
messages. So point out WHERE this is assigned to an unsigned integer.

> About -0003-
> 
> I coded the solution mentioned by Robert and will submit it tonight after
> making sure
> It's safe.

Excellent.

> It just looked like a hack to me though I made the patch and posted here
> for exactly this discussion Adding gas change at @0:00 can be handy, I'm
> not a diver myself but as of this moment there's not a way -at least
> that I'm ware of- to sort Cylinders so If the user entered them in the
> wrong order and wanted to change the initial one instead of sorting them
> manually he can add that gas change @0:00

That's a strange edge case.
Here are some assumptions that we tend to make
a) most people get the data into Subsurface via a download from their dive
computer (or, initially, importing from other software).
b) if there are errors with the tanks, it is unlikely that it is a tank
with relevant data that is at the wrong position (i.e., if you have air
integration or start and end pressures, if the gas is wrong you actually
WANT to change the gas settings for that tank and not switch to a
different tank
So basically it seems rather unlikely that the user really has the wrong
order of tanks and needs to switch to a different tank.

/D


More information about the subsurface mailing list