diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-01-10 12:17:14 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-10 13:44:43 -0800 |
commit | 1808804babb7d7f00e798236df16bbef58114a38 (patch) | |
tree | 8c4e377866971f4fdf9a77da32890d002a0c4d52 /commands | |
parent | bd6c874be0e89aa0d2b6cb2e33895961364e231e (diff) | |
download | subsurface-1808804babb7d7f00e798236df16bbef58114a38.tar.gz |
Make sure to sanitize the gasmix after editing it
Otherwise we end up showing the gasmix in a different form after editing
for the usual air percentages, because we haven't normalized the gasmix
values and store them back in the dive in the non-normalized format.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'commands')
-rw-r--r-- | commands/command_edit.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/commands/command_edit.cpp b/commands/command_edit.cpp index 49b1c7cce..62150ad9c 100644 --- a/commands/command_edit.cpp +++ b/commands/command_edit.cpp @@ -1241,6 +1241,7 @@ EditCylinder::EditCylinder(int index, cylinder_t cylIn, EditCylinderType typeIn, cyl[i].gasmix = cylIn.gasmix; cyl[i].bestmix_o2 = cylIn.bestmix_o2; cyl[i].bestmix_he = cylIn.bestmix_he; + sanitize_gasmix(&cyl[i].gasmix); break; } } |