LCL: TControl.UpdateBaseBounds: set cfBaseBoundsValid

git-svn-id: trunk@36857 -
This commit is contained in:
mattias 2012-04-17 07:45:34 +00:00
parent ce9a70f3d4
commit 706f472758

View File

@ -3750,6 +3750,7 @@ begin
for a:=Low(TAnchorKind) to high(TAnchorKind) do for a:=Low(TAnchorKind) to high(TAnchorKind) do
if (a in NewAnchors) and (AnchorSide[a].Side=asrCenter) then if (a in NewAnchors) and (AnchorSide[a].Side=asrCenter) then
AnchorSide[a].FixCenterAnchoring; AnchorSide[a].FixCenterAnchoring;
UpdateAnchorRules;
AdjustSize; AdjustSize;
end; end;
@ -3787,10 +3788,11 @@ begin
NewBaseParentClientSize:=Size(0,0); NewBaseParentClientSize:=Size(0,0);
end else end else
NewBaseParentClientSize:=FBaseParentClientSize; NewBaseParentClientSize:=FBaseParentClientSize;
if CompareRect(@NewBaseBounds,@FBaseBounds)
and (NewBaseParentClientSize.cx=FBaseParentClientSize.cx) if (not CompareRect(@NewBaseBounds,@FBaseBounds))
and (NewBaseParentClientSize.cy=FBaseParentClientSize.cy) or (NewBaseParentClientSize.cx<>FBaseParentClientSize.cx)
then exit; or (NewBaseParentClientSize.cy<>FBaseParentClientSize.cy)
then begin
//if csDesigning in ComponentState then //if csDesigning in ComponentState then
{$IFDEF CHECK_POSITION} {$IFDEF CHECK_POSITION}
if CheckPosition(Self) then if CheckPosition(Self) then
@ -3801,10 +3803,12 @@ begin
' NewParentClientSize='+dbgs(NewBaseParentClientSize), ' NewParentClientSize='+dbgs(NewBaseParentClientSize),
'']); '']);
{$ENDIF} {$ENDIF}
FBaseBounds:=NewBaseBounds; FBaseBounds:=NewBaseBounds;
Include(FControlFlags,cfBaseBoundsValid);
FBaseParentClientSize:=NewBaseParentClientSize; FBaseParentClientSize:=NewBaseParentClientSize;
end; end;
Include(FControlFlags,cfBaseBoundsValid);
end;
procedure TControl.WriteLayoutDebugReport(const Prefix: string); procedure TControl.WriteLayoutDebugReport(const Prefix: string);
var var