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 <[email protected]>

>From fa2a32dd23657184a39a2566e61d4d633b6e82e1 Mon Sep 17 00:00:00 2001
From: willem ferguson <[email protected]>
Date: Fri, 9 Jan 2015 08:49:56 +0200
Subject: [PATCH 2/2] 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 checkbix in the Preferences).

Signed-off-by: willem ferguson <[email protected]>
---
 qt-ui/profile/profilewidget2.cpp | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index a3e08d8..7d29f7a 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -531,10 +531,10 @@ 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);
+//		o2SetpointGasItem->setVisible(true);
+//	else
+//		o2SetpointGasItem->setVisible(false);
 
 	/* 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 +991,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);
-- 
1.9.1

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to