summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/diveplanner.cpp16
-rw-r--r--qt-ui/diveplanner.h2
2 files changed, 9 insertions, 9 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;
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h
index bc6f696ad..b5c78a93c 100644
--- a/qt-ui/diveplanner.h
+++ b/qt-ui/diveplanner.h
@@ -46,7 +46,7 @@ public:
QList<QPair<int, int> > collectGases(dive *d);
public slots:
- int addStop(int meters = 0, int minutes = 0, int o2 = 0, int he = 0, int ccpoint = 0 );
+ int addStop(int millimeters = 0, int seconds = 0, int o2 = 0, int he = 0, int ccpoint = 0 );
void addCylinder_clicked();
void setGFHigh(const int gfhigh);
void setGFLow(const int ghflow);