formatting

git-svn-id: trunk@14817 -
This commit is contained in:
paul 2008-04-14 16:11:02 +00:00
parent ce0cf00e3d
commit 104762c2a8

View File

@ -3234,7 +3234,8 @@ procedure TControl.SetVisible(Value : Boolean);
var var
AsWincontrol: TWinControl; AsWincontrol: TWinControl;
begin begin
if FVisible <> Value then begin if FVisible <> Value then
begin
//DebugLn(['TControl.SetVisible ',DbgSName(Self),' NewVisible=',Value]); //DebugLn(['TControl.SetVisible ',DbgSName(Self),' NewVisible=',Value]);
VisibleChanging; VisibleChanging;
FVisible := Value; FVisible := Value;
@ -3242,26 +3243,27 @@ begin
Perform(CM_VISIBLECHANGED, WParam(Ord(Value)), 0); Perform(CM_VISIBLECHANGED, WParam(Ord(Value)), 0);
Include(FControlFlags,cfRequestAlignNeeded); Include(FControlFlags,cfRequestAlignNeeded);
if (Self is TWinControl) then if (Self is TWinControl) then
AsWincontrol:=TWinControl(Self) AsWincontrol := TWinControl(Self)
else else
AsWincontrol:=nil; AsWincontrol := nil;
if FVisible then begin if FVisible then
if AsWincontrol<>nil then begin
Include(AsWincontrol.FWinControlFlags,wcfReAlignNeeded); if AsWincontrol <> nil then
Include(AsWincontrol.FWinControlFlags, wcfReAlignNeeded);
AdjustSize; AdjustSize;
if (AsWincontrol<>nil) and (wcfReAlignNeeded in AsWincontrol.FWinControlFlags) then if (AsWincontrol <> nil) and (wcfReAlignNeeded in AsWincontrol.FWinControlFlags) then
AsWincontrol.ReAlign; AsWincontrol.ReAlign;
end; end;
if cfRequestAlignNeeded in FControlFlags then if cfRequestAlignNeeded in FControlFlags then
RequestAlign; RequestAlign;
if AsWincontrol<>nil then if AsWincontrol <> nil then
AsWincontrol.ResizeDelayedAutoSizeChildren; AsWincontrol.ResizeDelayedAutoSizeChildren;
finally finally
VisibleChanged; VisibleChanged;
end; end;
end; end;
if (csLoading in ComponentState) then if (csLoading in ComponentState) then
ControlState:=ControlState+[csVisibleSetInLoading]; ControlState := ControlState + [csVisibleSetInLoading];
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------