Hello,
we upgraded simultaneously from TChart 7 to TChart 8 and from an older Delphi to Delphi 2009. We use the TTree rather extensively and also need the zoom functionality quite often. Now we discovered a change in behavior which is a problem for us.
OLD BEHAVIOR (the desired one):
When zooming in and out the center of the zoom is the center of the currently visible tree-area (client area of the component).
NEW BEHAVIOR:
When zooming in and out the center of the zoom is the center of the whole tree.
The new behavior has a big disadvantage: if you have a very large zoom factor to view small details and then use the mouse wheel to zoom out again it nearly always happens that the detail you just viewed kind of "runs away" to one of the edges of the component.
I think this is because while zooming in, the center of the tree is moved away from the center of the client area of the TTree component. When zooming out again, the center of the zoom operation is outside the client area thus making the content of the tree "heading" towards this spot.
I hope it is clear what I meant. If not, please say so and I'll try to clarify. This behavior is making zooming a real pain because to have one detail centered while zooming out you have to move it into the center of the client area again and again.
Thanks for reading, your time and hopefully help!
Markus-Heinrich
TTree zoom-behavior changed - how to get back the old one?
Well I found the bug. It is in the following method:
The parameter given to the handler should not be Zoom, but Value - as it always was. It now would have to be rounded because of the type change, so the fix looks like this:
Please, add this as fix to the next release, because otherwise the handling of our apps is considerably impaired!!
Thanks!
Code: Select all
Procedure TView3DOptions.SetZoom(const Value:Double);
begin
if FZoom<>Value then
begin
if Assigned(FOnChangedZoom) then FOnChangedZoom(Zoom); { <-- offending part! }
FZoom:=Value;
Repaint;
end;
end;
Code: Select all
if Assigned(FOnChangedZoom) then FOnChangedZoom(round(Value));
Thanks!
Hi Markus-Heinrich,
Thank you for reporting this. I've implemented you suggestion so it will be available with next releases.
Thank you for reporting this. I've implemented you suggestion so it will be available with next releases.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |