summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/diveprofileitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profile/diveprofileitem.cpp')
-rw-r--r--qt-ui/profile/diveprofileitem.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp
index 1e7a5b535..1a6eeae5c 100644
--- a/qt-ui/profile/diveprofileitem.cpp
+++ b/qt-ui/profile/diveprofileitem.cpp
@@ -833,14 +833,14 @@ void PartialPressureGasItem::modelDataChanged(const QModelIndex &topLeft, const
alertPolygons.clear();
QSettings s;
s.beginGroup("TecDetails");
- double threshould = s.value(threshouldKey).toDouble();
+ double threshold = *thresholdPtr;
bool inAlertFragment = false;
for (int i = 0; i < dataModel->rowCount(); i++, entry++) {
double value = dataModel->index(i, vDataColumn).data().toDouble();
int time = dataModel->index(i, hDataColumn).data().toInt();
QPointF point(hAxis->posAtValue(time), vAxis->posAtValue(value));
poly.push_back(point);
- if (value >= threshould) {
+ if (value >= threshold) {
if (inAlertFragment) {
alertPolygons.back().push_back(point);
} else {
@@ -873,9 +873,9 @@ void PartialPressureGasItem::paint(QPainter *painter, const QStyleOptionGraphics
painter->restore();
}
-void PartialPressureGasItem::setThreshouldSettingsKey(const QString &threshouldSettingsKey)
+void PartialPressureGasItem::setThreshouldSettingsKey(double *prefPointer)
{
- threshouldKey = threshouldSettingsKey;
+ thresholdPtr = prefPointer;
}
PartialPressureGasItem::PartialPressureGasItem()