diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-12-03 20:55:00 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-12-03 20:55:00 -0800 |
commit | 06711732c94600c8b3106b2e3260ebd69de53a98 (patch) | |
tree | 79425c5d8aaa30de64a75c4e2d766330a738f20a /qt-ui/diveplanner.cpp | |
parent | 623be2e46f8bd7aff83f0ab18328d10a0da6d100 (diff) | |
download | subsurface-06711732c94600c8b3106b2e3260ebd69de53a98.tar.gz |
Correct parameter names
It's very confusing when a parameter is called "minutes" but holds
seconds...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r-- | qt-ui/diveplanner.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 4502814de..5efb7aaed 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -1176,17 +1176,17 @@ bool DivePlannerPointsModel::addGas(int o2, int he) return false; } -int DivePlannerPointsModel::addStop(int milimeters, int minutes, int o2, int he, int ccpoint) +int DivePlannerPointsModel::addStop(int milimeters, int seconds, int o2, int he, int ccpoint) { int row = divepoints.count(); - if (minutes == 0 && milimeters == 0 && row != 0){ + if (seconds == 0 && milimeters == 0 && row != 0){ /* this is only possible if the user clicked on the 'plus' sign on the DivePoints Table */ struct divedatapoint& t = divepoints.last(); milimeters = t.depth; - minutes = t.time + 600; // 10 minutes. - } else if (minutes == 0 && milimeters == 0 && row == 0) { + seconds = t.time + 600; // 10 minutes. + } else if (seconds == 0 && milimeters == 0 && row == 0) { milimeters = M_OR_FT(5, 15); // 5m / 15ft - minutes = 600; // 10 min + seconds = 600; // 10 min } if (o2 != -1) if (!addGas(o2, he)) @@ -1195,14 +1195,14 @@ int DivePlannerPointsModel::addStop(int milimeters, int minutes, int o2, int he, // check if there's already a new stop before this one: for (int i = 0; i < row; i++) { const divedatapoint& dp = divepoints.at(i); - if (dp.time == minutes) { + if (dp.time == seconds) { row = i; beginRemoveRows(QModelIndex(), row, row); divepoints.remove(row); endRemoveRows(); break; } - if (dp.time > minutes ) { + if (dp.time > seconds ) { row = i; break; } @@ -1230,7 +1230,7 @@ int DivePlannerPointsModel::addStop(int milimeters, int minutes, int o2, int he, beginInsertRows(QModelIndex(), row, row); divedatapoint point; point.depth = milimeters; - point.time = minutes; + point.time = seconds; point.o2 = o2; point.he = he; point.po2 = ccpoint; |