diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-03-11 11:23:50 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-03-11 11:43:17 -0700 |
commit | e121b4b548598ea16976980c0fc4af4dcd948b07 (patch) | |
tree | 4d8af2ead198f8e0bd3bd7825ec12fde2a98a1b2 /qt-ui | |
parent | 74638c5f65e62c82439ee59d0e35541de0590265 (diff) | |
download | subsurface-e121b4b548598ea16976980c0fc4af4dcd948b07.tar.gz |
Make sure no gas changes with negative time can be added
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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; |