ToolTipItem: only show gf line in pressure graph when using Buhlmann model

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Rick Walsh 2016-10-26 16:21:46 +11:00 committed by Dirk Hohndel
parent 46f3b0f238
commit a2d6bcf23f

View file

@ -264,7 +264,8 @@ void ToolTipItem::refresh(const QPointF &pos)
painter.drawRect(0,0,16,10);
if (entry) {
painter.setPen(QColor(0, 0, 0, 255));
painter.drawLine(0, 60 - entry->gfline / 2, 16, 60 - entry->gfline / 2);
if (prefs.deco_mode == BUEHLMANN)
painter.drawLine(0, 60 - entry->gfline / 2, 16, 60 - entry->gfline / 2);
painter.drawLine(0, 60 - AMB_PERCENTAGE * (entry->pressures.n2 + entry->pressures.he) / entry->ambpressure / 2,
16, 60 - AMB_PERCENTAGE * (entry->pressures.n2 + entry->pressures.he) / entry->ambpressure /2);
painter.setPen(QColor(0, 0, 0, 127));