LCL: autosize: ignore invisible childs with alCustom

git-svn-id: trunk@21236 -
This commit is contained in:
mattias 2009-08-15 20:52:35 +00:00
parent cff3746b3d
commit 3f4099eb7b
2 changed files with 5 additions and 5 deletions

View File

@ -3070,9 +3070,9 @@ begin
if CheckPosition(Self) then
DebugLn(['TControl.UpdateBaseBounds '+DbgSName(Self),
' OldBounds='+dbgs(FBaseBounds),
' OldClientSize='+dbgs(FBaseParentClientSize),
' OldParentClientSize='+dbgs(FBaseParentClientSize),
' NewBounds='+dbgs(NewBaseBounds),
' NewClientSize='+dbgs(NewBaseParentClientSize),
' NewParentClientSize='+dbgs(NewBaseParentClientSize),
'']);
{$ENDIF}
FBaseBounds:=NewBaseBounds;

View File

@ -33,7 +33,7 @@
{off $DEFINE CHECK_POSITION}
{$IFDEF CHECK_POSITION}
const CheckPostionClassName = 'xxTPage';
const CheckPostionName = 'OIMiscGroupBox';
const CheckPostionName = 'Button1';
const CheckPostionParentName = 'xxxEnvVarsPage';
function CheckPosition(AControl: TControl): boolean;
@ -1002,7 +1002,7 @@ begin
VisibleCount:=0;
for i:=0 to ChildCount-1 do begin
Child:=WinControl.Controls[i];
if Child.Align=alCustom then begin
if (Child.Align=alCustom) and Child.IsControlVisible then begin
// this is not LCL business
exit;
end;
@ -3259,7 +3259,7 @@ begin
AdjustClientRect(CurClientRect);
// get minimum left, top of non aligned childs
GetMoveDiffForNonAlignedChilds(CurClientRect,dx,dy);
//DebugLn(['TWinControl.DoAutoSize ',DbgSName(Self),' ChildsBounds=',dbgs(ChildBounds),' CurClientRect=',dbgs(CurClientRect)]);
//DebugLn(['TWinControl.DoAutoSize ',DbgSName(Self),' CurClientRect=',dbgs(CurClientRect)]);
if (dx<>0) or (dy<>0) then begin
// move all free childs to left and top of client area