[PATCH 5/5] Profile2: hide the tooltip and ruler if we are printing

Lubomir I. Ivanov neolit123 at gmail.com
Tue Mar 25 14:34:12 PDT 2014


From: "Lubomir I. Ivanov" <neolit123 at gmail.com>

Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
 qt-ui/profile/profilewidget2.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 3862d06..def8c2a 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -347,6 +347,15 @@ void ProfileWidget2::plotDives(QList<dive *> dives)
 		zoomLevel = 0;
 	}
 
+	// reset some item visibility on printMode changes
+	toolTipItem->setVisible(!printMode);
+	QSettings s;
+	s.beginGroup("TecDetails");
+	const bool rulerVisible = s.value("rulergraph", false).toBool() && !printMode;
+	rulerItem->setVisible(rulerVisible);
+	rulerItem->sourceNode()->setVisible(rulerVisible);
+	rulerItem->destNode()->setVisible(rulerVisible);
+
 	// No need to do this again if we are already showing the same dive
 	// computer of the same dive, so we check the unique id of the dive
 	// and the selected dive computer number against the ones we are
-- 
1.7.11.msysgit.0



More information about the subsurface mailing list