You've already forked lazarus-ccr
GridPrinter: Fix custom painting of cell broken by previous commit.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8633 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -220,7 +220,8 @@ type
|
|||||||
procedure DoLinePrinted(ARow, ALastCol: Integer); virtual;
|
procedure DoLinePrinted(ARow, ALastCol: Integer); virtual;
|
||||||
procedure DoNewPage(AStartCol, AStartRow, AEndCol, AEndRow: Integer); virtual;
|
procedure DoNewPage(AStartCol, AStartRow, AEndCol, AEndRow: Integer); virtual;
|
||||||
procedure DoPrepareCanvas(ACol, ARow: Integer); virtual;
|
procedure DoPrepareCanvas(ACol, ARow: Integer); virtual;
|
||||||
procedure DoPrintCell(ACanvas: TCanvas; ACol, ARow: Integer; ARect: TRect); virtual;
|
procedure DoPrintCell(ACanvas: TCanvas; ACol, ARow: Integer; ARect: TRect;
|
||||||
|
var Done: boolean); virtual;
|
||||||
procedure DoUpdatePreview; virtual;
|
procedure DoUpdatePreview; virtual;
|
||||||
procedure Execute(ACanvas: TCanvas);
|
procedure Execute(ACanvas: TCanvas);
|
||||||
function GetBrushColor(AColor: TColor): TColor;
|
function GetBrushColor(AColor: TColor): TColor;
|
||||||
@ -752,13 +753,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TGridPrinter.DoPrintCell(ACanvas: TCanvas; ACol, ARow: Integer;
|
procedure TGridPrinter.DoPrintCell(ACanvas: TCanvas; ACol, ARow: Integer;
|
||||||
ARect: TRect);
|
ARect: TRect; var Done: Boolean);
|
||||||
begin
|
begin
|
||||||
if Assigned(FOnPrintCell) then
|
if Assigned(FOnPrintCell) then
|
||||||
begin
|
begin
|
||||||
FOnPrintCell(Self, FGrid, ACanvas, ACol, ARow, ARect);
|
FOnPrintCell(Self, FGrid, ACanvas, ACol, ARow, ARect);
|
||||||
exit;
|
Done := true;
|
||||||
end;
|
end else
|
||||||
|
Done := false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TGridPrinter.DoUpdatePreview;
|
procedure TGridPrinter.DoUpdatePreview;
|
||||||
@ -1295,8 +1297,11 @@ var
|
|||||||
col: TGridColumn;
|
col: TGridColumn;
|
||||||
lGrid: TGridAccess;
|
lGrid: TGridAccess;
|
||||||
checkedState: TCheckboxState;
|
checkedState: TCheckboxState;
|
||||||
|
done: Boolean;
|
||||||
begin
|
begin
|
||||||
DoPrintCell(ACanvas, ACol, ARow, ARect);
|
DoPrintCell(ACanvas, ACol, ARow, ARect, done);
|
||||||
|
if done then
|
||||||
|
exit;
|
||||||
|
|
||||||
lGrid := TGridAccess(FGrid);
|
lGrid := TGridAccess(FGrid);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user