diff options
author | Robert C. Helling <helling@atdotde.de> | 2019-08-08 11:33:10 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-08-08 08:56:44 -0700 |
commit | 826387a4b0f177c5b645c2483ca4fb11c76e01dc (patch) | |
tree | 74045ff506d13b8434faea64775b57c6c1f87a89 /profile-widget | |
parent | f1fc3283557d0cdb7338c5ab99fa0d8385c5dfa2 (diff) | |
download | subsurface-826387a4b0f177c5b645c2483ca4fb11c76e01dc.tar.gz |
Indicate negative cylider pressure
The planner can produce negative cylinder pressures when
more gas is used than available. Let's color the pressure
graph in a highly visible color to alert the user of the
fact that current gas planning is insufficient.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'profile-widget')
-rw-r--r-- | profile-widget/diveprofileitem.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp index 6d5cdb2da..521e3fb82 100644 --- a/profile-widget/diveprofileitem.cpp +++ b/profile-widget/diveprofileitem.cpp @@ -809,7 +809,10 @@ void DiveGasPressureItem::paint(QPainter *painter, const QStyleOptionGraphicsIte else pen.setBrush(MED_GRAY_HIGH_TRANS); } else { - pen.setBrush(getPressureColor(entry->density)); + if (vAxis->valueAt(poly[i]) < 0) + pen.setBrush(MAGENTA); + else + pen.setBrush(getPressureColor(entry->density)); } painter->setPen(pen); painter->drawLine(poly[i - 1], poly[i]); |