diff --git a/src/AllPlot.cpp b/src/AllPlot.cpp index b3215796c..8111e53da 100644 --- a/src/AllPlot.cpp +++ b/src/AllPlot.cpp @@ -32,6 +32,7 @@ #include "Zones.h" #include "Colors.h" #include "WPrime.h" +#include "IndendPlotMarker.h" #include #include @@ -2299,6 +2300,8 @@ AllPlot::recalc(AllPlotObject *objects) void AllPlot::refreshIntervalMarkers() { + QwtIndPlotMarker::resetDrawnLabels(); + foreach(QwtPlotMarker *mrk, standard->d_mrk) { mrk->detach(); delete mrk; @@ -2316,7 +2319,7 @@ AllPlot::refreshIntervalMarkers() if (interval.isBest() || interval.isPeak() || interval.isMatch()) nolabel = true; - QwtPlotMarker *mrk = new QwtPlotMarker; + QwtPlotMarker *mrk = new QwtIndPlotMarker; standard->d_mrk.append(mrk); mrk->attach(this); mrk->setLineStyle(QwtPlotMarker::VLine); @@ -2473,6 +2476,11 @@ AllPlot::plotReferenceLine(const RideFilePoint *referencePoint) return referenceLine; } +void +AllPlot::replot() { + QwtIndPlotMarker::resetDrawnLabels(); + QwtPlot::replot(); + } void AllPlot::setYMax() diff --git a/src/AllPlot.h b/src/AllPlot.h index adc3bd11f..44ffed55b 100644 --- a/src/AllPlot.h +++ b/src/AllPlot.h @@ -538,6 +538,8 @@ class AllPlot : public QwtPlot void confirmTmpReference(double value, int axis, bool allowDelete); QwtPlotCurve* plotReferenceLine(const RideFilePoint *referencePoint); + virtual void replot(); + // remembering state etc CurveColors *curveColors;