lcl: grids: check top left after size change - also for negative values. Issue #30211

git-svn-id: trunk@52497 -
This commit is contained in:
ondrej 2016-06-12 20:26:01 +00:00
parent dda51d51ec
commit 6eb42f280e

View File

@ -4733,11 +4733,21 @@ begin
begin
fTopLeft.y := FGCache.MaxTopLeft.y;
TLChanged := True;
end else
if FTopLeft.y < FixedRows then
begin
fTopLeft.y := FixedRows;
TLChanged := True;
end;
if fTopLeft.x > FGCache.MaxTopLeft.x then
begin
fTopLeft.x := FGCache.MaxTopLeft.x;
TLChanged := True;
end else
if FTopLeft.x < FixedCols then
begin
fTopLeft.x := FixedCols;
TLChanged := True;
end;
FGCache.TLRowOff := Min(FGCache.TLRowOff, FGCache.MaxTLOffset.y);
FGCache.TLColOff := Min(FGCache.TLColOff, FGCache.MaxTLOffset.x);