summaryrefslogtreecommitdiffstats
path: root/profile-widget
diff options
context:
space:
mode:
Diffstat (limited to 'profile-widget')
-rw-r--r--profile-widget/diveeventitem.cpp2
-rw-r--r--profile-widget/profilewidget2.cpp18
2 files changed, 10 insertions, 10 deletions
diff --git a/profile-widget/diveeventitem.cpp b/profile-widget/diveeventitem.cpp
index 5af188c2d..b5a532e7a 100644
--- a/profile-widget/diveeventitem.cpp
+++ b/profile-widget/diveeventitem.cpp
@@ -165,7 +165,7 @@ void DiveEventItem::setupToolTipString()
}
} else if (type == SAMPLE_EVENT_PO2 && same_string(internalEvent->name, "SP change")) {
// this is a bad idea - we are abusing an existing event type that is supposed to
- // warn of high or low pO₂ and are turning it into a set point change event
+ // warn of high or low pO₂ and are turning it into a setpoint change event
name += ":\n" + tr("Manual switch to OC");
} else {
name += internalEvent->flags & SAMPLE_FLAGS_BEGIN ? tr(" begin", "Starts with space!") :
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index d4899232b..5a48e3a5f 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -639,7 +639,7 @@ void ProfileWidget2::plotDive(struct dive *d, bool force)
if (shouldCalculateMaxTime || newMaxtime > maxtime)
maxtime = newMaxtime;
- /* Only update the max depth if it's bigger than the current ones
+ /* Only update the max. depth if it's bigger than the current ones
* when we are dragging the handler to plan / add dive.
* otherwhise, update normally.
*/
@@ -1736,13 +1736,13 @@ void ProfileWidget2::repositionDiveHandlers()
continue;
DiveHandler *h = handles.at(i);
h->setVisible(datapoint.entered);
- h->setPos(timeAxis->posAtValue(datapoint.time), profileYAxis->posAtValue(datapoint.depth));
+ h->setPos(timeAxis->posAtValue(datapoint.time), profileYAxis->posAtValue(datapoint.depth.mm));
QPointF p1;
if (i == 0) {
if (prefs.drop_stone_mode)
// place the text on the straight line from the drop to stone position
- p1 = QPointF(timeAxis->posAtValue(datapoint.depth / prefs.descrate),
- profileYAxis->posAtValue(datapoint.depth));
+ p1 = QPointF(timeAxis->posAtValue(datapoint.depth.mm / prefs.descrate),
+ profileYAxis->posAtValue(datapoint.depth.mm));
else
// place the text on the straight line from the origin to the first position
p1 = QPointF(timeAxis->posAtValue(0), profileYAxis->posAtValue(0));
@@ -1794,7 +1794,7 @@ void ProfileWidget2::recreatePlannedDive()
return;
divedatapoint data = plannerModel->at(index);
- data.depth = lrint(profileYAxis->valueAt(activeHandler->pos()) / M_OR_FT(1, 1)) * M_OR_FT(1, 1);
+ data.depth.mm = lrint(profileYAxis->valueAt(activeHandler->pos()) / M_OR_FT(1, 1)) * M_OR_FT(1, 1);
data.time = lrint(timeAxis->valueAt(activeHandler->pos()));
plannerModel->editStop(index, data);
@@ -1810,10 +1810,10 @@ void ProfileWidget2::keyDownAction()
if (DiveHandler *handler = qgraphicsitem_cast<DiveHandler *>(i)) {
int row = handles.indexOf(handler);
divedatapoint dp = plannerModel->at(row);
- if (dp.depth >= profileYAxis->maximum())
+ if (dp.depth.mm >= profileYAxis->maximum())
continue;
- dp.depth += M_OR_FT(1, 5);
+ dp.depth.mm += M_OR_FT(1, 5);
plannerModel->editStop(row, dp);
}
}
@@ -1830,10 +1830,10 @@ void ProfileWidget2::keyUpAction()
int row = handles.indexOf(handler);
divedatapoint dp = plannerModel->at(row);
- if (dp.depth <= 0)
+ if (dp.depth.mm <= 0)
continue;
- dp.depth -= M_OR_FT(1, 5);
+ dp.depth.mm -= M_OR_FT(1, 5);
plannerModel->editStop(row, dp);
}
}