mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-14 02:19:39 +02:00
lcl: fixed TApplication.CreateForm for splashform
This commit is contained in:
parent
a7e90edd46
commit
872608c382
@ -2247,29 +2247,31 @@ begin
|
||||
if (FCreatingForm=nil) and (Instance is TForm) then
|
||||
FCreatingForm:=TForm(Instance);
|
||||
Instance.Create(Self);
|
||||
|
||||
if (Instance is TForm) then
|
||||
begin
|
||||
AForm := TForm(Instance);
|
||||
UpdateMainForm(AForm);
|
||||
if FMainForm = AForm then
|
||||
AForm.HandleNeeded;
|
||||
if AForm.FormStyle = fsSplash then
|
||||
begin
|
||||
// show the splash form and handle the paint message
|
||||
AForm.Show;
|
||||
AForm.Invalidate;
|
||||
ProcessMessages;
|
||||
end;
|
||||
end;
|
||||
|
||||
ok:=true;
|
||||
finally
|
||||
if not ok then begin
|
||||
TComponent(Reference) := nil;
|
||||
if FCreatingForm=Instance then
|
||||
FCreatingForm:=nil;
|
||||
end;
|
||||
if FCreatingForm=Instance then
|
||||
FCreatingForm:=nil;
|
||||
end;
|
||||
|
||||
if (Instance is TForm) then
|
||||
begin
|
||||
AForm := TForm(Instance);
|
||||
UpdateMainForm(AForm);
|
||||
if FMainForm = AForm then
|
||||
AForm.HandleNeeded;
|
||||
if AForm.FormStyle = fsSplash then
|
||||
begin
|
||||
// show the splash form and handle the paint message
|
||||
AForm.Show;
|
||||
AForm.Invalidate;
|
||||
ProcessMessages;
|
||||
end;
|
||||
end;
|
||||
{$IFDEF AfterConstructionDataModuleNotWorking}
|
||||
if (Instance is TDataModule) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user