Grids, if grid.font is modified while painting, do affect canvas.font directly to avoid repainting cycles due invalidates

git-svn-id: trunk@19434 -
This commit is contained in:
jesus 2009-04-15 05:22:41 +00:00
parent f609a21c6e
commit df15c64cf9

View File

@ -6228,12 +6228,16 @@ end;
procedure TCustomGrid.FontChanged(Sender: TObject);
begin
inherited FontChanged(Sender);
if FColumns.Enabled then
FColumns.FontChanged;
if FTitleFontIsDefault then begin
FTitleFont.Assign(Font);
FTitleFontIsDefault := True;
if csCustomPaint in ControlState then
Canvas.Font := Font
else begin
inherited FontChanged(Sender);
if FColumns.Enabled then
FColumns.FontChanged;
if FTitleFontIsDefault then begin
FTitleFont.Assign(Font);
FTitleFontIsDefault := True;
end;
end;
end;