Bug in TDrawLine.Assign
Posted: 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,
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,