Qt: update cached FScrollY and FScrollX when value of scrollbar is changed.

git-svn-id: trunk@35900 -
This commit is contained in:
zeljko 2012-03-12 09:39:00 +00:00
parent 4ea260ab19
commit ad8b5a310d

View File

@ -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);