summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-07-06 16:22:24 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-11-09 19:19:04 +0100
commitbef1eac7fa4baabc0f970b50acac1f4bee7d7f7c (patch)
tree9daf6584da2ae9a139a41761cc1ba9e0136ea210 /qt-models
parent7c6a904bbff56d9d3ad782b569231e0a0bb16847 (diff)
downloadsubsurface-bef1eac7fa4baabc0f970b50acac1f4bee7d7f7c.tar.gz
Profile: use pressure data functions in DivePlotDataModel
The model was accessing the pressure data directly. Instead, use the accessor functions so that the core structure can be changed more easily. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/diveplotdatamodel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/qt-models/diveplotdatamodel.cpp b/qt-models/diveplotdatamodel.cpp
index 6809ee952..c8f086867 100644
--- a/qt-models/diveplotdatamodel.cpp
+++ b/qt-models/diveplotdatamodel.cpp
@@ -32,7 +32,7 @@ QVariant DivePlotDataModel::data(const QModelIndex &index, int role) const
case TIME:
return item.sec;
case PRESSURE:
- return item.pressure[0][0];
+ return get_plot_sensor_pressure(&pInfo, index.row(), 0);
case TEMPERATURE:
return item.temperature;
case COLOR:
@@ -40,9 +40,9 @@ QVariant DivePlotDataModel::data(const QModelIndex &index, int role) const
case USERENTERED:
return false;
case SENSOR_PRESSURE:
- return item.pressure[0][0];
+ return get_plot_sensor_pressure(&pInfo, index.row(), 0);
case INTERPOLATED_PRESSURE:
- return item.pressure[0][1];
+ return get_plot_interpolated_pressure(&pInfo, index.row(), 0);
case CEILING:
return item.ceiling;
case SAC: