mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-20 12:19:31 +02:00
lcl: grids: don't invalidate grid when changing bounds if not necessary. Issue #31518
git-svn-id: trunk@54733 -
This commit is contained in:
parent
910b0b45e8
commit
1223f3b20a
@ -6946,10 +6946,22 @@ begin
|
||||
end;
|
||||
|
||||
procedure TCustomGrid.DoOnChangeBounds;
|
||||
var
|
||||
OldTopLeft: TPoint;
|
||||
OldColOff, OldRowOff: Integer;
|
||||
begin
|
||||
inherited DoOnChangeBounds;
|
||||
|
||||
VisualChange;
|
||||
if FUpdateCount=0 then
|
||||
begin
|
||||
OldTopLeft := fTopLeft;
|
||||
OldColOff := FGCache.TLColOff;
|
||||
OldRowOff := FGCache.TLRowOff;
|
||||
UpdateSizes;
|
||||
if (OldTopLeft.X<>FTopLeft.X) or (OldTopLeft.Y<>FTopLeft.Y)
|
||||
or (OldColOff<>FGCache.TLColOff) or (OldRowOff<>FGCache.TLRowOff) then // reduce unnecessary repaints
|
||||
Invalidate;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCustomGrid.KeyDown(var Key: Word; Shift: TShiftState);
|
||||
|
Loading…
Reference in New Issue
Block a user