PDA

View Full Version : Qwt 5.2 to 6.1 change: NaN values no longer skipped, as discontinuities.



philw
16th October 2015, 23:40
It was significant to us that NaNs encountered within curve data resulted in a discontinuity of the drawn curve. This no longer occurs (at least, by default) in Qwt 6.1. See these 5.2.3 and 6.2.1 examples:

11446 11447

Is there some way of restoring the 5.2 appearance with Qwt 6.1?

Thank you in advance.


-----
P.S. ... Back peddling! Actually, the skipping of NaNs was not default Qwt behavior!

We had provided our own implementation of the QwtPlotCurve::drawCurve() virtual method which was no longer getting called. (A parameter had been added in the Qwt method. And we didn't have the new "override" keyword in our method declaration which would have caught that difference).


virtual void drawCurve (QPainter* painter,
int style,
const QwtScaleMap& xMap,
const QwtScaleMap& yMap,
const QRectF& canvasRect, // <<< New in 6.0 or 6.1
int from,
int to) const override; // <<< Always use "override".