mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 12:47:27 +01:00
LCL: TCustomForm: autosize/updateshowing is now delayed till AfterConstruction, including DoCreate, bug #16290
git-svn-id: trunk@24700 -
This commit is contained in:
parent
188ae1249a
commit
49948f42f1
@ -75,7 +75,9 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomForm.AfterConstruction;
|
||||
begin
|
||||
//DebugLn(['TCustomForm.AfterConstruction ']);
|
||||
DoCreate;
|
||||
EndFormUpdate; // the BeginFormUpdate is in CreateNew
|
||||
inherited AfterConstruction;
|
||||
end;
|
||||
|
||||
@ -1794,9 +1796,7 @@ begin
|
||||
//DebugLn('[TCustomForm.Create] A Class=',Classname);
|
||||
GlobalNameSpace.BeginWrite;
|
||||
try
|
||||
BeginFormUpdate;
|
||||
try
|
||||
CreateNew(AOwner, 1);
|
||||
CreateNew(AOwner, 1); // this calls BeginFormUpdate, which is ended in AfterConstruction
|
||||
//DebugLn('[TCustomForm.Create] B Class=',Classname);
|
||||
if (ClassType <> TForm) and not (csDesigning in ComponentState) then
|
||||
begin
|
||||
@ -1814,9 +1814,6 @@ begin
|
||||
Exclude(FFormState, fsCreating);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
EndFormUpdate;
|
||||
end;
|
||||
finally
|
||||
GlobalNameSpace.EndWrite;
|
||||
end;
|
||||
@ -1862,8 +1859,8 @@ begin
|
||||
Color := clBtnFace;
|
||||
FloatingDockSiteClass := TWinControlClass(ClassType);
|
||||
Screen.AddForm(Self);
|
||||
EndFormUpdate;
|
||||
FAllowDropFiles := False;
|
||||
// the EndFormUpdate is done in AfterConstruction
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user