Let cylinderid = -1 mean same gas as before

It's not too clever to give 0 a special meaning (as here:
use same gas as for previous leg) when 0 is a legitimate
value.

This should solve Willem's gas disappearance problem when
reediting a dive in the planner.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
Robert C. Helling 2017-02-04 14:12:43 +01:00 committed by Dirk Hohndel
parent cd38cda186
commit 2516ae7e5f
3 changed files with 4 additions and 3 deletions

View file

@ -932,7 +932,7 @@ void ProfileWidget2::mouseDoubleClickEvent(QMouseEvent *event)
int minutes = rint(timeAxis->valueAt(mappedPos) / 60);
int milimeters = rint(profileYAxis->valueAt(mappedPos) / M_OR_FT(1, 1)) * M_OR_FT(1, 1);
plannerModel->addStop(milimeters, minutes * 60, 0, 0, true);
plannerModel->addStop(milimeters, minutes * 60, -1, 0, true);
}
}