mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 17:52:16 +02:00
lcl: newautosize: fixed beginformupdate
git-svn-id: trunk@23851 -
This commit is contained in:
parent
b4dee09450
commit
108c4be5b8
@ -3176,10 +3176,14 @@ procedure TControl.FormEndUpdated;
|
||||
// called when control is on a form and EndFormUpdate reached 0
|
||||
// it is called recursively
|
||||
begin
|
||||
{$IFDEF NewAutoSize}
|
||||
|
||||
{$ELSE}
|
||||
if cfOnResizeNeeded in FControlFlags then
|
||||
Resize;
|
||||
if cfOnChangeBoundsNeeded in FControlFlags then
|
||||
CheckOnChangeBounds;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -4779,7 +4783,10 @@ begin
|
||||
if FAutoSizingLockCount=1 then
|
||||
begin
|
||||
if Parent<>nil then
|
||||
begin
|
||||
DebugLn(['TControl.DisableAutoSizing ',DbgSName(Self),' disable Parent=',DbgSName(Parent)]);
|
||||
Parent.DisableAutoSizing;
|
||||
end;
|
||||
end;
|
||||
{$ELSE}
|
||||
inc(FAutoSizingLockCount);
|
||||
@ -4787,6 +4794,7 @@ begin
|
||||
end;
|
||||
|
||||
procedure TControl.EnableAutoSizing;
|
||||
|
||||
{$IFNDEF NewAutoSize}
|
||||
procedure AdjustSizeRecursive(AControl: TControl);
|
||||
var
|
||||
@ -4812,8 +4820,10 @@ begin
|
||||
if (FAutoSizingLockCount=0) then
|
||||
begin
|
||||
if (Parent<>nil) then
|
||||
Parent.EnableAutoSizing
|
||||
else
|
||||
begin
|
||||
DebugLn(['TControl.EnableAutoSizing ',DbgSName(Self),' enable Parent ',DbgSName(Parent)]);
|
||||
Parent.EnableAutoSizing;
|
||||
end else
|
||||
DoAllAutoSize;
|
||||
end;
|
||||
{$ELSE}
|
||||
|
@ -2219,7 +2219,8 @@ procedure TCustomForm.BeginFormUpdate;
|
||||
begin
|
||||
inc(FFormUpdateCount);
|
||||
{$IFDEF NewAutoSize}
|
||||
DisableAutoSizing;
|
||||
if FFormUpdateCount=1 then
|
||||
DisableAutoSizing;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
|
@ -5830,6 +5830,7 @@ begin
|
||||
if AControl.FAutoSizingLockCount>0 then
|
||||
begin
|
||||
// the AControl has disabled autosizing => disable it for the parent=self too
|
||||
DebugLn(['TWinControl.Insert ',DbgSName(Self),' Control=',DbgSName(AControl),' disable Parent']);
|
||||
DisableAutoSizing;
|
||||
end;
|
||||
{$ENDIF}
|
||||
@ -5879,6 +5880,7 @@ begin
|
||||
begin
|
||||
// AControl has disabled autosizing and thus for its parent=Self too
|
||||
// end disable autosize for parent=self
|
||||
DebugLn(['TWinControl.Remove ',DbgSName(Self),' Control=',DbgSName(AControl),' enable Parent']);
|
||||
EnableAutoSizing;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
Loading…
Reference in New Issue
Block a user