mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Repair minor bug in CCR setpoint graph
Correct minor malfunction with CCR setpoint display. It was showing even when the po2 display was turned off. This patch ensures that the setpoint graph only shows when the po2 toolbar button is activated (and in addition the appropriate checkbox in the Preferences). Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
3c15834c3c
commit
d45e870289
1 changed files with 2 additions and 5 deletions
|
@ -531,10 +531,7 @@ void ProfileWidget2::plotDive(struct dive *d, bool force)
|
|||
currentdc = fake_dc(currentdc);
|
||||
}
|
||||
|
||||
if (current_dive && (currentdc->dctype == CCR) && (prefs.show_ccr_setpoint))
|
||||
o2SetpointGasItem->setVisible(true);
|
||||
else
|
||||
o2SetpointGasItem->setVisible(false);
|
||||
o2SetpointGasItem->setVisible(current_dive && (currentdc->dctype == CCR) && prefs.show_ccr_setpoint && prefs.pp_graphs.po2);
|
||||
|
||||
/* This struct holds all the data that's about to be plotted.
|
||||
* I'm not sure this is the best approach ( but since we are
|
||||
|
@ -991,7 +988,7 @@ void ProfileWidget2::setProfileState()
|
|||
}
|
||||
pn2GasItem->setVisible(prefs.pp_graphs.pn2);
|
||||
po2GasItem->setVisible(prefs.pp_graphs.po2);
|
||||
o2SetpointGasItem->setVisible(current_dive && (current_dc->dctype == CCR) && (prefs.show_ccr_setpoint));
|
||||
o2SetpointGasItem->setVisible(current_dive && prefs.pp_graphs.po2 && (current_dc->dctype == CCR) && (prefs.show_ccr_setpoint));
|
||||
pheGasItem->setVisible(prefs.pp_graphs.phe);
|
||||
|
||||
timeAxis->setPos(itemPos.time.pos.on);
|
||||
|
|
Loading…
Add table
Reference in a new issue