From e121b4b548598ea16976980c0fc4af4dcd948b07 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 11 Mar 2015 11:23:50 -0700 Subject: [PATCH] Make sure no gas changes with negative time can be added Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 66ef84ac4..36b9c6468 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -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;