From 88daadd8b602520b2daddc8a7ff6e822cc59316a Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Mon, 3 Feb 2014 20:18:09 +0000 Subject: [PATCH] Fix shading zorder .. so power shading doesn't hide altitude Fixes #772 --- src/AllPlot.cpp | 4 ++-- src/LTMPlot.cpp | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/AllPlot.cpp b/src/AllPlot.cpp index 8c5b69b14..cc7c35de8 100644 --- a/src/AllPlot.cpp +++ b/src/AllPlot.cpp @@ -77,7 +77,7 @@ class AllPlotBackground: public QwtPlotItem public: AllPlotBackground(AllPlot *_parent) { - setZ(0.0); + setZ(-100.0); parent = _parent; } @@ -222,7 +222,7 @@ class AllPlotZoneLabel: public QwtPlotItem } } - setZ(1.0 + zone_number / 100.0); + setZ(-99.00 + zone_number / 100.0); } virtual int rtti() const { diff --git a/src/LTMPlot.cpp b/src/LTMPlot.cpp index 7b737b773..3ba1a9124 100644 --- a/src/LTMPlot.cpp +++ b/src/LTMPlot.cpp @@ -781,6 +781,7 @@ LTMPlot::setData(LTMSettings *set) // handle precision of 1 for seconds converted to hours int precision = m->precision(); if (metricDetail.uunits == "seconds") precision=1; + if (metricDetail.uunits == "km") precision=0; // we have a metric so lets be precise ... labelString = QString("%1").arg(value * (context->athlete->useMetricUnits ? 1 : m->conversion()) @@ -942,6 +943,7 @@ LTMPlot::setData(LTMSettings *set) // handle precision of 1 for seconds converted to hours int precision = m->precision(); if (metricDetail.uunits == "seconds") precision=1; + if (metricDetail.uunits == "km") precision=0; // we have a metric so lets be precise ... labelString = QString("%1").arg(value * (context->athlete->useMetricUnits ? 1 : m->conversion())