mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
f1fc328355
commit
826387a4b0
2 changed files with 5 additions and 1 deletions
|
@ -65,6 +65,7 @@
|
|||
|
||||
// Magentas
|
||||
#define MEDIUMREDVIOLET1_HIGHER_TRANS QColor::fromRgbF(0.7, 0.2, 0.7, 0.1)
|
||||
#define MAGENTA QColor::fromRgbF(1.0, 0.0, 1.0, 1.0)
|
||||
|
||||
#define SAC_COLORS_START_IDX SAC_1
|
||||
#define SAC_COLORS 9
|
||||
|
|
|
@ -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]);
|
||||
|
|
Loading…
Add table
Reference in a new issue