You've already forked lazarus-ccr
tvplanit: Fix page-breaks when printing contact grid to printer or preview.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8526 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -329,7 +329,7 @@ begin
|
||||
FreeMem(FPageInfo[i]);
|
||||
end;
|
||||
FPageInfo.Clear;
|
||||
CurPage := 0;
|
||||
FCurPage := 0;
|
||||
end;
|
||||
|
||||
{$IFDEF DELPHI}
|
||||
@@ -694,8 +694,6 @@ end;
|
||||
procedure TVpPrintPreview.LoadPage(PageNum: Integer;
|
||||
StartDate, EndDate: TDateTime);
|
||||
var
|
||||
i: Integer;
|
||||
LastPage: Boolean;
|
||||
pageInfo: PVpPageInfo;
|
||||
lDate: TDateTime;
|
||||
lTask: Integer;
|
||||
@@ -703,6 +701,13 @@ var
|
||||
lLastPage: Boolean;
|
||||
begin
|
||||
Unused(EndDate);
|
||||
if FPageInfo.Count = 0 then
|
||||
raise Exception.Create('No pages to print');
|
||||
|
||||
if (PageNum < 0) then
|
||||
PageNum := 0;
|
||||
if (PageNum >= FPageInfo.Count) then
|
||||
PageNum := FPageInfo.Count - 1;
|
||||
|
||||
pageInfo := PVpPageInfo(FPageInfo[PageNum]);
|
||||
lDate := pageInfo.Date;
|
||||
|
Reference in New Issue
Block a user