bigjoeystud
18th January 2011, 20:47
I use Qwt and have a range of doubles on my bottom axis which range from 1.012330801e+18 to 1.012330802e+18. What happens is my axis disappears when the number delta is very small.
I have debugged the code and came across where the problem occurs and it is in QwtScaleArithmetic::ceilEps and QwtScaleArithmetic::floorEps.
In that code, a qCeil/qFloor is called which converts the value into an integer before returning the value. This integer value will overflow causing the limits to be zero, thus no axis tick/label will be show. Changing the qCeil/qFloor to ceil and floor respectively seems to fix it.
Since the two routines return a double anyway, was there a reason for using the integer version?
Joey
I have debugged the code and came across where the problem occurs and it is in QwtScaleArithmetic::ceilEps and QwtScaleArithmetic::floorEps.
In that code, a qCeil/qFloor is called which converts the value into an integer before returning the value. This integer value will overflow causing the limits to be zero, thus no axis tick/label will be show. Changing the qCeil/qFloor to ceil and floor respectively seems to fix it.
Since the two routines return a double anyway, was there a reason for using the integer version?
Joey