LCL: overrided TControl.Update in TGraphicControl, so it calls Update() only for TGraphicControl client rect, not whole parent handle.

git-svn-id: trunk@31132 -
This commit is contained in:
zeljko 2011-06-08 07:00:02 +00:00
parent 58dbddba3e
commit 23249c0b48
2 changed files with 13 additions and 1 deletions

View File

@ -2021,7 +2021,7 @@ type
procedure Paint; virtual;
procedure DoOnChangeBounds; override;
procedure DoOnParentHandleDestruction; override;
procedure Update; override;
property OnPaint: TNotifyEvent read FOnPaint write FOnPaint;
public
constructor Create(AOwner: TComponent); override;

View File

@ -111,5 +111,17 @@ begin
TControlCanvas(Canvas).FreeHandle;
end;
procedure TGraphicControl.Update;
var
R: TRect;
begin
if Assigned(Parent) and Parent.HandleAllocated and Parent.Visible then
begin
R := ClientRect;
OffsetRect(R, Left, Top);
LCLIntf.InvalidateRect(Parent.Handle, @R, True);
end;
end;
// included by controls.pp