Fix PM day offset by 1

Almost certainly caused by a fencepost errors somewhere else
in the code. This fixes the offset by subtracting one from the
offset used.

Fixes #28
This commit is contained in:
Mark Liversedge
2010-10-31 23:01:16 +00:00
committed by Justin Knotzke
parent e3c6e7e76c
commit da8e636e65

View File

@@ -102,7 +102,12 @@ void PerfPlot::plot() {
daypen.setWidth(1.0);
DAYcurve->setPen(daypen);
DAYcurve->setStyle(QwtPlotCurve::Sticks);
DAYcurve->setData(_sc->getDays()+xmin,_sc->getDAYvalues()+xmin,num);
// XXX Note: the days are offset by 1 without the -1 in the
// line below --------------+
// |
// V
DAYcurve->setData(_sc->getDays()+xmin -1 ,_sc->getDAYvalues()+xmin,num);
DAYcurve->setYAxis(yRight);
DAYcurve->attach(this);