mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-06 21:58:32 +01:00
LCL: fix dbgrids scrollbar thumbtracking, issue #33799
git-svn-id: trunk@58055 -
This commit is contained in:
parent
687cdf6ff9
commit
8144529ef7
@ -1456,6 +1456,8 @@ var
|
||||
end;
|
||||
|
||||
function DsPos: boolean;
|
||||
var
|
||||
oldMaxPos: Integer;
|
||||
begin
|
||||
result := false;
|
||||
aPos := Message.Pos;
|
||||
@ -1463,12 +1465,22 @@ var
|
||||
result := true;
|
||||
exit;
|
||||
end;
|
||||
if aPos>=MaxPos then
|
||||
oldMaxPos := MaxPos;
|
||||
if aPos>=oldMaxPos then
|
||||
dsGoto(False)
|
||||
else if aPos<=0 then
|
||||
dsGoto(True)
|
||||
else if IsSeq then
|
||||
FDatalink.DataSet.RecNo := aPos + 1
|
||||
else if IsSeq then begin
|
||||
FDatalink.DataSet.RecNo := aPos + 1;
|
||||
{$IFDEF MSWINDOWS}
|
||||
// Workaround for scrollbar range not being updated
|
||||
// probably only needed under windows, issue 33799
|
||||
if oldMaxPos<>MaxPos then begin
|
||||
ScrollBarShow(SB_VERT, false);
|
||||
ScrollBarShow(SB_VERT, true);
|
||||
end;
|
||||
{$ENDIF}
|
||||
end
|
||||
else begin
|
||||
DeltaRec := Message.Pos - FOldPosition;
|
||||
if DeltaRec=0 then begin
|
||||
|
||||
Loading…
Reference in New Issue
Block a user