From bb041069a35d2ae8dee81d9b0e37bde1b289920d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 13 Nov 2013 22:38:14 +0900 Subject: Fix addGas to look at the correct cylinder That was a stupid bug. You have to actually update the variable to look at the right cylinder. Duh. Signed-off-by: Dirk Hohndel --- qt-ui/diveplanner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 6bc67ada0..06d7ae9d1 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -1132,11 +1132,11 @@ bool divePointsLessThan(const divedatapoint& p1, const divedatapoint& p2) bool DivePlannerPointsModel::addGas(int o2, int he) { - cylinder_t *cyl = stagingDive->cylinder; if (is_air(o2, he)) o2 = 0; for (int i = 0; i < MAX_CYLINDERS; i++) { + cylinder_t *cyl = &stagingDive->cylinder[i]; if (cylinder_nodata(cyl)) { fill_default_cylinder(cyl); cyl->gasmix.o2.permille = o2; -- cgit v1.2.3-70-g09d2