diff options
author | Willem Ferguson <willemferguson@zoology.up.ac.za> | 2015-01-09 08:54:57 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-09 09:16:29 -0800 |
commit | d45e870289e719426f9caefde61f0493ab7e6c72 (patch) | |
tree | 1b398cb16f5abf11d859d2d52f6690dda8886dc8 /qt-ui/profile | |
parent | 3c15834c3c9c7ae8d8994d7476c62ea0029d8e40 (diff) | |
download | subsurface-d45e870289e719426f9caefde61f0493ab7e6c72.tar.gz |
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>
Diffstat (limited to 'qt-ui/profile')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index a3e08d816..7ccc7cfad 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -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); |