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,23 +3788,26 @@ 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)
//if csDesigning in ComponentState then then begin
{$IFDEF CHECK_POSITION} //if csDesigning in ComponentState then
if CheckPosition(Self) then {$IFDEF CHECK_POSITION}
DebugLn(['TControl.UpdateBaseBounds '+DbgSName(Self), if CheckPosition(Self) then
' OldBounds='+dbgs(FBaseBounds), DebugLn(['TControl.UpdateBaseBounds '+DbgSName(Self),
' OldParentClientSize='+dbgs(FBaseParentClientSize), ' OldBounds='+dbgs(FBaseBounds),
' NewBounds='+dbgs(NewBaseBounds), ' OldParentClientSize='+dbgs(FBaseParentClientSize),
' NewParentClientSize='+dbgs(NewBaseParentClientSize), ' NewBounds='+dbgs(NewBaseBounds),
'']); ' NewParentClientSize='+dbgs(NewBaseParentClientSize),
{$ENDIF} '']);
FBaseBounds:=NewBaseBounds; {$ENDIF}
FBaseBounds:=NewBaseBounds;
FBaseParentClientSize:=NewBaseParentClientSize;
end;
Include(FControlFlags,cfBaseBoundsValid); Include(FControlFlags,cfBaseBoundsValid);
FBaseParentClientSize:=NewBaseParentClientSize;
end; end;
procedure TControl.WriteLayoutDebugReport(const Prefix: string); procedure TControl.WriteLayoutDebugReport(const Prefix: string);