Make sure no gas changes with negative time can be added

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-03-11 11:23:50 -07:00
parent 74638c5f65
commit e121b4b548

View file

@ -1391,6 +1391,9 @@ void ProfileWidget2::changeGas()
struct gasmix gasmix;
int seconds = timeAxis->valueAt(scenePos);
// no gas changes before the dive starts
seconds = seconds > 0 ?: 0;
if (seconds == 0) {
bool eventRemoved = false;
struct event *gasChangeEvent = current_dc->events;