Bug in TDrawLine.Assign

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Mariano
Newbie
Newbie
Posts: 46
Joined: Fri Nov 15, 2002 12:00 am
Location: España

Bug in TDrawLine.Assign

Post by Mariano » Wed May 30, 2007 9:47 am

Hi,

I 'm making a class that herite from TDrawLine and I found problem with the assign method. (Pen and style not recopied)

I suggest you replace the implementation of TDrawLine.Assign by this one:

procedure TDrawLine.Assign(Source: TPersistent);
begin
if Source is TDrawLine then
Begin
Self.StartPos := TDrawLine(Source).StartPos;
Self.EndPos := TDrawLine(Source).EndPos;
Self.FStyle := TDrawLine(Source).FStyle;

if Assigned(TDrawLine(Source).FPen) then
SetPen(TDrawLine(Source).FPen)
else
if Assigned(Self.FPen) then
FreeAndNil(Self.FPen);

end
else inherited;
end;

My context:
TeeChart win 7.05 (with source)
Delphi Architect 9.0


regards,

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed May 30, 2007 9:57 am

Hi Mariano,

Thanks for your suggestion. I've added it to our wish-list to be considered for inclusion in future releases.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply