mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 18:33:23 +00:00
Make sure no gas changes with negative time can be added
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
74638c5f65
commit
e121b4b548
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue