mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 12:59:12 +02:00
Qt: update cached FScrollY and FScrollX when value of scrollbar is changed.
git-svn-id: trunk@35900 -
This commit is contained in:
parent
4ea260ab19
commit
ad8b5a310d
@ -7239,7 +7239,8 @@ var
|
||||
b: Boolean;
|
||||
begin
|
||||
{$ifdef VerboseQt}
|
||||
writeln('TQtAbstractSlider.SlotValueChanged() to value ',p1,' inUpdate ',inUpdate,' maxIs ',getMax);
|
||||
writeln('TQtAbstractSlider.SlotValueChanged() to value ',p1,' inUpdate ',inUpdate,' maxIs ',getMax,
|
||||
' FChildOfComplexWidget ',FChildOfComplexWidget);
|
||||
{$endif}
|
||||
|
||||
FillChar(LMScroll, SizeOf(LMScroll), #0);
|
||||
@ -7254,6 +7255,15 @@ begin
|
||||
LMScroll.Pos := p1;
|
||||
LMScroll.ScrollCode := SIF_POS;
|
||||
|
||||
if (FChildOfComplexWidget = ccwAbstractScrollArea) and Assigned(FOwner) and
|
||||
(FOwner.ChildOfComplexWidget = ccwScrollingWinControl) then
|
||||
begin
|
||||
if LMScroll.Msg = LM_VSCROLL then
|
||||
TQtCustomControl(FOwner).viewport.FScrollY := -p1
|
||||
else
|
||||
TQtCustomControl(FOwner).viewport.FScrollX := -p1;
|
||||
end;
|
||||
|
||||
if not InUpdate then
|
||||
DeliverMessage(LMScroll);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user