Carbon: offset invalidated rect by scrolloffset in InvalidateRect(). issue #21364

git-svn-id: trunk@35884 -
This commit is contained in:
zeljko 2012-03-11 13:41:12 +00:00
parent 9652b47265
commit 6acda204b2

View File

@ -2331,6 +2331,8 @@ end;
------------------------------------------------------------------------------}
function TCarbonWidgetSet.InvalidateRect(AHandle: HWND; Rect: pRect;
bErase: Boolean): Boolean;
var
Pt: TPoint;
begin
Result := False;
@ -2339,7 +2341,12 @@ begin
{$ENDIF}
if not CheckWidget(AHandle, 'InvalidateRect') then Exit;
if Rect <> nil then
begin
Pt := TCarbonWidget(AHandle).ScrollOffset;
OffsetRect(Rect^, -Pt.X, -Pt.Y);
end;
TCarbonWidget(AHandle).Invalidate(Rect);
Result := True;
end;