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>
This commit is contained in:
Robert C. Helling 2017-05-14 09:26:36 +02:00 committed by Dirk Hohndel
parent bb6ceba4ac
commit 98a65b7157
3 changed files with 20 additions and 4 deletions

View file

@ -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]);
}