mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 15:19:22 +02:00
LCL: fixed updating pending AutoSize requests after EableAutoSizing
git-svn-id: trunk@12681 -
This commit is contained in:
parent
1a09783017
commit
e258ad4d35
@ -297,6 +297,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
inherited WSSetText(AText);
|
||||
//DebugLn(['TCustomButton.WSSetText ',dbgsName(Self),' Caption="',Caption,'" AutoSizeCanStart=',AutoSizeCanStart,' AutoSizeDelayed=',AutoSizeDelayed]);
|
||||
AdjustSize;
|
||||
end;
|
||||
|
||||
|
@ -4242,13 +4242,27 @@ begin
|
||||
end;
|
||||
|
||||
procedure TControl.EnableAutoSizing;
|
||||
|
||||
procedure AdjustSizeRecursive(AControl: TControl);
|
||||
var
|
||||
AWinControl: TWinControl;
|
||||
i: Integer;
|
||||
begin
|
||||
if cfAutoSizeNeeded in AControl.FControlFlags then
|
||||
AControl.AdjustSize;
|
||||
if AControl is TWinControl then begin
|
||||
AWinControl:=TWinControl(AControl);
|
||||
if AWincontrol.FWinControls<>nil then
|
||||
for i:=0 to AWincontrol.FWinControls.Count-1 do
|
||||
AdjustSizeRecursive(TControl(AWincontrol.FWinControls[i]));
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
if FAutoSizingLockCount<=0 then RaiseGDBException('TControl.EnableAutoSizing');
|
||||
dec(FAutoSizingLockCount);
|
||||
if FAutoSizingLockCount=0 then begin
|
||||
if cfAutoSizeNeeded in FControlFlags then
|
||||
AdjustSize;
|
||||
end;
|
||||
if FAutoSizingLockCount=0 then
|
||||
AdjustSizeRecursive(Self);
|
||||
end;
|
||||
|
||||
procedure TControl.EndAutoSizing;
|
||||
|
Loading…
Reference in New Issue
Block a user