diff options
author | Robert C. Helling <helling@atdotde.de> | 2015-01-11 00:01:15 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-10 17:27:25 -0800 |
commit | e219bc70f863eaaa9b81ba5abc240975a128c904 (patch) | |
tree | 682d6d981929420bbabd0021e02db3006c72d96f /qt-ui/profile | |
parent | bfe05b43407c419a32548af20f40e2b9e3bca045 (diff) | |
download | subsurface-e219bc70f863eaaa9b81ba5abc240975a128c904.tar.gz |
Refactor dctype -> divemode
... and repair a failed rebase (sorry).
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r-- | qt-ui/profile/diveprofileitem.cpp | 6 | ||||
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp index c049d9178..60a030bb0 100644 --- a/qt-ui/profile/diveprofileitem.cpp +++ b/qt-ui/profile/diveprofileitem.cpp @@ -624,14 +624,14 @@ void DiveGasPressureItem::modelDataChanged(const QModelIndex &topLeft, const QMo int o2mbar; QPolygonF boundingPoly, o2Poly; // This is the "Whole Item", but a pressure can be divided in N Polygons. polygons.clear(); - if (displayed_dive.dc.dctype == CCR) + if (displayed_dive.dc.divemode == CCR) polygons.append(o2Poly); for (int i = 0, count = dataModel->rowCount(); i < count; i++) { o2mbar = 0; plot_data *entry = dataModel->data().entry + i; int mbar = GET_PRESSURE(entry); - if (displayed_dive.dc.dctype == CCR) + if (displayed_dive.dc.divemode == CCR) o2mbar = GET_O2CYLINDER_PRESSURE(entry); if (entry->cylinderindex != last_index) { @@ -665,7 +665,7 @@ void DiveGasPressureItem::modelDataChanged(const QModelIndex &topLeft, const QMo for (int i = 0, count = dataModel->rowCount(); i < count; i++) { entry = dataModel->data().entry + i; mbar = GET_PRESSURE(entry); - if (displayed_dive.dc.dctype == CCR && displayed_dive.oxygen_cylinder_index >= 0) + if (displayed_dive.dc.divemode == CCR && displayed_dive.oxygen_cylinder_index >= 0) o2mbar = GET_O2CYLINDER_PRESSURE(entry); if (o2mbar) { diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 7ccc7cfad..f24e17d6f 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -531,7 +531,7 @@ void ProfileWidget2::plotDive(struct dive *d, bool force) currentdc = fake_dc(currentdc); } - o2SetpointGasItem->setVisible(current_dive && (currentdc->dctype == CCR) && prefs.show_ccr_setpoint && prefs.pp_graphs.po2); + o2SetpointGasItem->setVisible(current_dive && (currentdc->divemode == CCR) && prefs.show_ccr_setpoint && prefs.pp_graphs.po2); /* This struct holds all the data that's about to be plotted. * I'm not sure this is the best approach ( but since we are @@ -988,7 +988,7 @@ void ProfileWidget2::setProfileState() } pn2GasItem->setVisible(prefs.pp_graphs.pn2); po2GasItem->setVisible(prefs.pp_graphs.po2); - o2SetpointGasItem->setVisible(current_dive && prefs.pp_graphs.po2 && (current_dc->dctype == CCR) && (prefs.show_ccr_setpoint)); + o2SetpointGasItem->setVisible(current_dive && prefs.pp_graphs.po2 && (current_dc->divemode == CCR) && (prefs.show_ccr_setpoint)); pheGasItem->setVisible(prefs.pp_graphs.phe); timeAxis->setPos(itemPos.time.pos.on); |