[Bug report] "Crazy" cursor tool
Posted: Wed Dec 06, 2006 1:40 pm
Hello,
I've had a problem with the cursortool using fastlineseries with very large values.
When I was moving the CursorTool (cssBoth style), it was jumping everywhere. The problem is in the function TCursorTool.NearestPoint() :
I guess calculating Sqr of very large numbers causes problems (maybe the result exceed the Double range or something.
I could correct this bug this way :
In the Function TCursorTool.SnapToPoint() :
CHANGED
INTO
Of course the behaviour of the cursorTool is not exactly the same as it moves like if it was cssVertical, but at least it doesn't jump everywhere.
I'm sorry because I didn't have much time to really test this bug, but I wanted to report you this problem.
Yours.
I've had a problem with the cursortool using fastlineseries with very large values.
When I was moving the CursorTool (cssBoth style), it was jumping everywhere. The problem is in the function TCursorTool.NearestPoint() :
Code: Select all
tmpDif:=Sqrt(Sqr(IXValue-XValues.Value[t])+Sqr(IYValue-YValues.Value[t]));
I could correct this bug this way :
In the Function TCursorTool.SnapToPoint() :
CHANGED
Code: Select all
if Assigned(Series) and FSnap then result:=NearestPoint(FStyle,Difference)
Code: Select all
if Assigned(Series) and FSnap then result:=NearestPoint(cssVertical,Difference)
I'm sorry because I didn't have much time to really test this bug, but I wanted to report you this problem.
Yours.