lcl, designer: better invalidate designer on move, resize (issue #0013886)

git-svn-id: trunk@21875 -
This commit is contained in:
paul 2009-09-26 03:26:52 +00:00
parent 5321a16744
commit b680c53595
2 changed files with 7 additions and 8 deletions

View File

@ -1544,8 +1544,6 @@ begin
begin
ControlSelection.CheckForLCLChanges(True);
end;
if (Sender <> Form) and (Sender.Parent <> nil) then
Sender.Parent.Invalidate;
end;
function TDesigner.MoveControl(Sender: TControl; TheMessage: TLMMove): Boolean;
@ -1564,8 +1562,6 @@ begin
OnPropertiesChanged(Self);
end;
end;
if (Sender <> Form) and (Sender.Parent <> nil) then
Sender.Parent.Invalidate;
end;
procedure TDesigner.MouseDownOnControl(Sender: TControl;

View File

@ -421,11 +421,14 @@ begin
if FSizeLock>0 then exit;
// invalidate
if (not (csLoading in ComponentState))
and (not (Self is TWinControl)) then
if (csDesigning in ComponentState) and (Parent <> nil) then
Parent.Invalidate
else
if (not (csLoading in ComponentState)) and (not (Self is TWinControl)) then
Invalidate;
// notify user about resize
if (not (csLoading in ComponentState)) then begin
if (not (csLoading in ComponentState)) then
begin
Resize;
CheckOnChangeBounds;
// for delphi compatibility send size/move messages
@ -4815,7 +4818,7 @@ end;
Event handler for LMSize messages.
Overriden by TWinControl.WMSize.
------------------------------------------------------------------------------}
procedure TControl.WMSize(Var Message : TLMSize);
procedure TControl.WMSize(var Message : TLMSize);
begin
{$IFDEF CHECK_POSITION}
if CheckPosition(Self) then