diff options
author | Robert C. Helling <helling@atdotde.de> | 2017-05-14 09:26:36 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-05-26 15:52:04 -0700 |
commit | 98a65b7157933ec7b9c63da70b44d6450f32c38c (patch) | |
tree | e3af42d0f316e7114a0eef6cbd1a3e64e245936d /profile-widget/diveprofileitem.cpp | |
parent | bb6ceba4ac0310c504f931674a71e9e77c0afa1c (diff) | |
download | subsurface-98a65b7157933ec7b9c63da70b44d6450f32c38c.tar.gz |
Display gas density instead of SAC in planner
In the planner, the SAC is prescribed, so there is little
use in plotting it (as the color of the cylinder pressure
line). Rather use the color to show the density of breathing
gas.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'profile-widget/diveprofileitem.cpp')
-rw-r--r-- | profile-widget/diveprofileitem.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp index 71a965ad8..ee03e9e6e 100644 --- a/profile-widget/diveprofileitem.cpp +++ b/profile-widget/diveprofileitem.cpp @@ -831,10 +831,14 @@ void DiveGasPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsIte Q_FOREACH (const QPolygonF &poly, polygons) { entry = dataModel->data().entry; for (int i = 1, count = poly.count(); i < count; i++, entry++) { - if (entry->sac) - pen.setBrush(getSacColor(entry->sac, displayed_dive.sac)); - else - pen.setBrush(MED_GRAY_HIGH_TRANS); + if (!in_planner()) { + if (entry->sac) + pen.setBrush(getSacColor(entry->sac, displayed_dive.sac)); + else + pen.setBrush(MED_GRAY_HIGH_TRANS); + } else { + pen.setBrush(getPressureColor(entry->density)); + } painter->setPen(pen); painter->drawLine(poly[i - 1], poly[i]); } |