TPen assign also copies pen mode (issue #1732), TShape invalidate if not visible at design time

git-svn-id: trunk@8774 -
This commit is contained in:
jesus 2006-02-19 07:33:58 +00:00
parent f96d5431af
commit 8b421f305e
2 changed files with 3 additions and 1 deletions

View File

@ -147,6 +147,7 @@ begin
Width := TPen(Source).Width;
SetColor(TPen(Source).Color,TFPCanvasHelper(Source).FPColor);
Style := TPen(Source).Style;
Mode := TPEn(Source).Mode;
end
else
inherited Assign(Source);

View File

@ -77,7 +77,8 @@ end;
procedure TShape.StyleChanged(Sender: TObject);
begin
If (Parent <> nil) and Visible and Parent.HandleAllocated
If (Parent <> nil) and (Visible or (csDesigning in ComponentState))
and Parent.HandleAllocated
then
Invalidate;
end;