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
@ -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…
x
Reference in New Issue
Block a user