LCL, fix grid cell coords when not using goSmoothScroll, issue #20561

git-svn-id: trunk@32873 -
This commit is contained in:
jesus 2011-10-13 19:48:28 +00:00
parent 4a5c0565bc
commit db602a1717

View File

@ -5272,8 +5272,11 @@ begin
// begin to count Cols from 0 but ...
if Fisical and (Offset>FixedWidth-1) then begin
Index := FTopLeft.X; // In scrolled view, then begin from FTopLeft col
if (Index>=0) and (Index<ColCount) then
Offset:=Offset-FixedWidth+integer(PtrUInt(AccumWidth[Index]))+TLColOff;
if (Index>=0) and (Index<ColCount) then begin
Offset:=Offset-FixedWidth+integer(PtrUInt(AccumWidth[Index]));
if goSmoothScroll in Options then
Offset:=Offset+TLColOff;
end;
if (Index<0) or (Index>=ColCount) or (Offset>GridWidth-1) then begin
if AllowOutboundEvents then
Index := ColCount-1