mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Correct parameter names
It's very confusing when a parameter is called "minutes" but holds seconds... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
623be2e46f
commit
06711732c9
2 changed files with 9 additions and 9 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue