summaryrefslogtreecommitdiffstats
path: root/profile-widget/diveprofileitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'profile-widget/diveprofileitem.cpp')
-rw-r--r--profile-widget/diveprofileitem.cpp12
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]);
}