Page 1 of 1

[Bug report] Division by 0 in TTeeCanvas3D.CalcPerspective

Posted: Thu Jul 27, 2006 12:10 pm
by 9343260
Hello,

I noticed a bug in a very particular situation :
I'm using a TeeTree near a TSplitter. The bug occurs only if there is a vertical scrollbar.

When I move my splitter, the error happens if the TeeTree width is exactly the size of the Scrollbar. This causes that the TeeTree width is 0 (because the srollbar takes the rest of the place).

In the file TeCanvas, function TTeeCanvas3D.CalcPerspective, there is a division :

Code: Select all

IZoomPerspec:=IZoomFactor*F3DOptions.Perspective*PerspecFactor/(Rect.Right-Rect.Left)
In the case I'm describing, the Rect.Right and Rect.Left are equal to 0, and this causes a DivisionByZero error.

To solve it, I had to add a test :

Code: Select all

if not ((Rect.Right = 0) and (Rect.Left = 0)) then ...
I hope you can correct it in the further releases.

Greets

Posted: Mon Jul 31, 2006 10:26 am
by Tom
Hi Bertrod,

Thanks for your bug-report and possible solution.

This bug should been fixed already in the latest release of teeChart. Which version of teeChart Pro are you using?

Regards,
Tom.

Posted: Mon Jul 31, 2006 11:17 am
by 9343260
Version 7.04. Sorry if the bug has been corrected since this version. :oops:

Posted: Mon Jul 31, 2006 12:19 pm
by Tom
Hi Bertrod,

You can download version 7.07 from our website. This version has a fix for the bug you mentioned.

Thanks again for reporting us this bug (even if it was already taken into account in a newer version)

Regards,
Tom.