FpWeb: call New HTTP Application options dialog in DoInitDescriptor callback instead of InitProject in order to avoid closing current project when the options form was just shown (current project should only be closed when user presses OK button in the options form)

This commit is contained in:
Maxim Ganetsky 2022-01-18 02:06:41 +03:00
parent 5aee55a625
commit 897f7280cb

View File

@ -200,6 +200,7 @@ type
function GetOptions: TModalResult;
public
constructor Create; override;
function DoInitDescriptor: TModalResult; override;
function GetLocalizedName: string; override;
function GetLocalizedDescription: string; override;
function InitProject(AProject: TLazProject): TModalResult; override;
@ -856,6 +857,11 @@ begin
Name:='FPHTTPApplication';
end;
function THTTPApplicationDescriptor.DoInitDescriptor: TModalResult;
begin
Result:=GetOptions;
end;
function THTTPApplicationDescriptor.GetLocalizedName: string;
begin
Result:=rsHTTPAppli;
@ -899,9 +905,6 @@ Var
begin
inherited InitProject(AProject);
Result:=GetOptions;
if Result<>mrOK then
Exit;
MainFile:=AProject.CreateProjectFile('httpproject1.lpr');
MainFile.IsPartOfProject:=true;
AProject.AddFile(MainFile,false);