I have a QwtPlot which axes values I set myself based on the values that I need to plot. Now, it may happen that I the axes values are set to +/- DBL_MAX. Now, when replotting (QwtPlot::replot()), updateAxes() is called which, in turn, eventually calls QwtLinearScaleEngine::divideScale() and this is where a problem occurs. Basically, that method will call buildTicks() if stepSize is different from zero, but with my big axes values, stepSize has here a non-finite value. The end result is that the call to buildTicks() never returns and the application eventually crashes.
Now, ideally, QwtLinearScaleEngine::divideScale() would check that stepSize is of a finite value and do something sensible if not. For now, all I personally to avoid the problem is:
if ( qIsFinite ( stepSize ) )
buildTicks( interval, stepSize, maxMinorSteps, ticks );
if ( qIsFinite ( stepSize ) )
buildTicks( interval, stepSize, maxMinorSteps, ticks );
To copy to clipboard, switch view to plain text mode
But this means that I don't get any tick at all while, ideally, I would still get some...
Bookmarks