mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 06:39:12 +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;
|
FKeySign: Integer;
|
||||||
FSavedRecord: Integer;
|
FSavedRecord: Integer;
|
||||||
FOnGetCellHint: TDbGridCellHintEvent;
|
FOnGetCellHint: TDbGridCellHintEvent;
|
||||||
FIntScrollDisabled: Boolean;
|
|
||||||
procedure EmptyGrid;
|
procedure EmptyGrid;
|
||||||
function GetColumns: TDBGridColumns;
|
function GetColumns: TDBGridColumns;
|
||||||
function GetCurrentColumn: TColumn;
|
function GetCurrentColumn: TColumn;
|
||||||
@ -1236,8 +1235,7 @@ var
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if FIntScrollDisabled or not FDatalink.Active then
|
if not FDatalink.Active then exit;
|
||||||
exit;
|
|
||||||
|
|
||||||
{$ifdef dbgDBGrid}
|
{$ifdef dbgDBGrid}
|
||||||
DebugLn('VSCROLL: Code=',SbCodeToStr(Message.ScrollCode),
|
DebugLn('VSCROLL: Code=',SbCodeToStr(Message.ScrollCode),
|
||||||
@ -1519,19 +1517,11 @@ begin
|
|||||||
// if the scrollbar is visible or not, in windows it
|
// if the scrollbar is visible or not, in windows it
|
||||||
// seems to mean if the scrollbar is redrawn or not
|
// seems to mean if the scrollbar is redrawn or not
|
||||||
// to reflect the scrollbar changes made
|
// 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,
|
SetScrollInfo(Handle, SB_VERT, ScrollInfo,
|
||||||
(ScrollBars in [ssBoth, ssVertical]) or
|
(ScrollBars in [ssBoth, ssVertical]) or
|
||||||
((Scrollbars in [ssAutoVertical, ssAutoBoth]) and (aRange>aPAge))
|
((Scrollbars in [ssAutoVertical, ssAutoBoth]) and (aRange>aPAge))
|
||||||
);
|
);
|
||||||
finally
|
|
||||||
FIntScrollDisabled := false;
|
|
||||||
FOldPosition := aPos;
|
FOldPosition := aPos;
|
||||||
end;
|
|
||||||
{$ifdef dbgDBGrid}
|
{$ifdef dbgDBGrid}
|
||||||
DebugLn('UpdateScrollBarRange: Handle=',IntToStr(Handle),
|
DebugLn('UpdateScrollBarRange: Handle=',IntToStr(Handle),
|
||||||
' aRange=', IntToStr(aRange),
|
' aRange=', IntToStr(aRange),
|
||||||
|
Loading…
Reference in New Issue
Block a user