LCL, fix grid's goScrollKeepVisible, issue #33783

git-svn-id: trunk@58024 -
This commit is contained in:
jesus 2018-05-25 06:22:40 +00:00
parent a8c53413f8
commit 825c389d9b

View File

@ -4887,8 +4887,12 @@ begin
if not GetSmoothScroll(SB_Vert) then
FGCache.TLRowOff := 0;
if not PointIgual(OldTopleft,FTopLeft) then
if not PointIgual(OldTopleft,FTopLeft) then begin
TopLeftChanged;
if goScrollKeepVisible in Options then
MoveNextSelectable(False, FTopLeft.x - oldTopLeft.x + col,
FTopLeft.y - oldTopLeft.y + row);
end;
NewTopLeftXY := GetPxTopLeft;
ScrollBy((OldTopLeftXY.x-NewTopLeftXY.x)*RTLSign, OldTopLeftXY.y-NewTopLeftXY.y);