Page 1 of 1

Bug in TDrawLine.Assign

Posted: Wed May 30, 2007 9:47 am
by 9333771
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,

Posted: Wed May 30, 2007 9:57 am
by narcis
Hi Mariano,

Thanks for your suggestion. I've added it to our wish-list to be considered for inclusion in future releases.