mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
7c6a904bbf
commit
bef1eac7fa
1 changed files with 3 additions and 3 deletions
|
@ -32,7 +32,7 @@ QVariant DivePlotDataModel::data(const QModelIndex &index, int role) const
|
||||||
case TIME:
|
case TIME:
|
||||||
return item.sec;
|
return item.sec;
|
||||||
case PRESSURE:
|
case PRESSURE:
|
||||||
return item.pressure[0][0];
|
return get_plot_sensor_pressure(&pInfo, index.row(), 0);
|
||||||
case TEMPERATURE:
|
case TEMPERATURE:
|
||||||
return item.temperature;
|
return item.temperature;
|
||||||
case COLOR:
|
case COLOR:
|
||||||
|
@ -40,9 +40,9 @@ QVariant DivePlotDataModel::data(const QModelIndex &index, int role) const
|
||||||
case USERENTERED:
|
case USERENTERED:
|
||||||
return false;
|
return false;
|
||||||
case SENSOR_PRESSURE:
|
case SENSOR_PRESSURE:
|
||||||
return item.pressure[0][0];
|
return get_plot_sensor_pressure(&pInfo, index.row(), 0);
|
||||||
case INTERPOLATED_PRESSURE:
|
case INTERPOLATED_PRESSURE:
|
||||||
return item.pressure[0][1];
|
return get_plot_interpolated_pressure(&pInfo, index.row(), 0);
|
||||||
case CEILING:
|
case CEILING:
|
||||||
return item.ceiling;
|
return item.ceiling;
|
||||||
case SAC:
|
case SAC:
|
||||||
|
|
Loading…
Add table
Reference in a new issue