mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
QML UI: don't allow negative gas consumption
If end pressure is higher than start pressure, simply use the same start and end pressure. Fixes #1024 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5a83226aa8
commit
f1d73606e5
1 changed files with 2 additions and 0 deletions
|
@ -609,6 +609,8 @@ parsed:
|
|||
diveChanged = true;
|
||||
d->cylinder[0].start.mbar = parsePressureToMbar(startpressure);
|
||||
d->cylinder[0].end.mbar = parsePressureToMbar(endpressure);
|
||||
if (d->cylinder[0].end.mbar > d->cylinder[0].start.mbar)
|
||||
d->cylinder[0].end.mbar = d->cylinder[0].start.mbar;
|
||||
}
|
||||
// gasmix for first cylinder
|
||||
if (get_gas_string(d->cylinder[0].gasmix) != gasmix) {
|
||||
|
|
Loading…
Add table
Reference in a new issue