You've already forked lazarus-ccr
tvplanit: Fix calculation of visible rows and columns in GanttView.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8456 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -563,9 +563,7 @@ var
|
|||||||
m: Integer = 0; // Result of mod
|
m: Integer = 0; // Result of mod
|
||||||
begin
|
begin
|
||||||
DivMod(AWidth - FixedColWidth, ColWidth, d, m);
|
DivMod(AWidth - FixedColWidth, ColWidth, d, m);
|
||||||
if m <> 0 then
|
if (m = 0) and (d > 1) then dec(d);
|
||||||
d := d-1;
|
|
||||||
if d < 1 then d := 1;
|
|
||||||
Result := d;
|
Result := d;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -575,9 +573,7 @@ var
|
|||||||
m: Integer = 0; // Result of mod
|
m: Integer = 0; // Result of mod
|
||||||
begin
|
begin
|
||||||
DivMod(AHeight - TotalColHeaderHeight, FRowHeight, d, m);
|
DivMod(AHeight - TotalColHeaderHeight, FRowHeight, d, m);
|
||||||
if m <> 0 then
|
if (m = 0) and (d > 1) then dec(d);
|
||||||
d := d-1;
|
|
||||||
if d < 1 then d := 1;
|
|
||||||
Result := d;
|
Result := d;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user