summaryrefslogtreecommitdiffstats
path: root/profile-widget/diveprofileitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'profile-widget/diveprofileitem.cpp')
-rw-r--r--profile-widget/diveprofileitem.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp
index da3028ebb..bc74f7f40 100644
--- a/profile-widget/diveprofileitem.cpp
+++ b/profile-widget/diveprofileitem.cpp
@@ -665,11 +665,12 @@ void DiveGasPressureItem::modelDataChanged(const QModelIndex &topLeft, const QMo
QPolygonF boundingPoly;
polygons.clear();
+ const struct plot_info *pInfo = &dataModel->data();
for (int i = 0, count = dataModel->rowCount(); i < count; i++) {
- struct plot_data *entry = dataModel->data().entry + i;
+ const struct plot_data *entry = pInfo->entry + i;
for (int cyl = 0; cyl < MAX_CYLINDERS; cyl++) {
- int mbar = get_plot_pressure(entry, cyl);
+ int mbar = get_plot_pressure(pInfo, i, cyl);
int time = entry->sec;
if (!mbar)
@@ -726,10 +727,10 @@ void DiveGasPressureItem::modelDataChanged(const QModelIndex &topLeft, const QMo
double axisLog = log10(log10(axisRange));
for (int i = 0, count = dataModel->rowCount(); i < count; i++) {
- struct plot_data *entry = dataModel->data().entry + i;
+ const struct plot_data *entry = pInfo->entry + i;
for (int cyl = 0; cyl < MAX_CYLINDERS; cyl++) {
- int mbar = get_plot_pressure(entry, cyl);
+ int mbar = get_plot_pressure(pInfo, i, cyl);
if (!mbar)
continue;