mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 01:19:37 +02:00
LCL, reverted dbgrid patch to workaround qt scrolling problem, will fix qt interface instead
git-svn-id: trunk@40510 -
This commit is contained in:
parent
3a5cd123e4
commit
8618e432a9
@ -316,7 +316,6 @@ type
|
||||
FKeySign: Integer;
|
||||
FSavedRecord: Integer;
|
||||
FOnGetCellHint: TDbGridCellHintEvent;
|
||||
FIntScrollDisabled: Boolean;
|
||||
procedure EmptyGrid;
|
||||
function GetColumns: TDBGridColumns;
|
||||
function GetCurrentColumn: TColumn;
|
||||
@ -1236,8 +1235,7 @@ var
|
||||
end;
|
||||
|
||||
begin
|
||||
if FIntScrollDisabled or not FDatalink.Active then
|
||||
exit;
|
||||
if not FDatalink.Active then exit;
|
||||
|
||||
{$ifdef dbgDBGrid}
|
||||
DebugLn('VSCROLL: Code=',SbCodeToStr(Message.ScrollCode),
|
||||
@ -1519,19 +1517,11 @@ begin
|
||||
// if the scrollbar is visible or not, in windows it
|
||||
// seems to mean if the scrollbar is redrawn or not
|
||||
// to reflect the scrollbar changes made
|
||||
//
|
||||
// FInt(eractive)ScrollDisabled is workaround for qt
|
||||
// that triggers a spurious scroll event when it shouldn't
|
||||
FIntScrollDisabled := true;
|
||||
try
|
||||
SetScrollInfo(Handle, SB_VERT, ScrollInfo,
|
||||
(ScrollBars in [ssBoth, ssVertical]) or
|
||||
((Scrollbars in [ssAutoVertical, ssAutoBoth]) and (aRange>aPAge))
|
||||
);
|
||||
finally
|
||||
FIntScrollDisabled := false;
|
||||
FOldPosition := aPos;
|
||||
end;
|
||||
SetScrollInfo(Handle, SB_VERT, ScrollInfo,
|
||||
(ScrollBars in [ssBoth, ssVertical]) or
|
||||
((Scrollbars in [ssAutoVertical, ssAutoBoth]) and (aRange>aPAge))
|
||||
);
|
||||
FOldPosition := aPos;
|
||||
{$ifdef dbgDBGrid}
|
||||
DebugLn('UpdateScrollBarRange: Handle=',IntToStr(Handle),
|
||||
' aRange=', IntToStr(aRange),
|
||||
|
Loading…
Reference in New Issue
Block a user