IDE: Keep suggesting the old suffix of a project main source file when "Saving As". Issue #39885.

This commit is contained in:
Juha 2022-09-18 15:45:30 +03:00
parent 4676d86152
commit 8bb0530a24

View File

@ -7610,14 +7610,10 @@ begin
SaveDialog:=IDESaveDialogClass.Create(nil);
try
InputHistories.ApplyFileDialogSettings(SaveDialog);
AFilename:='';
// build a nice project info filename suggestion
if UseMainSourceFile and (Project1.MainUnitID>=0) then
AFilename:=Project1.MainUnitInfo.Unit_Name;
AFilename:=ExtractFileName(Project1.MainFilename);
if AFilename='' then
AFilename:=ExtractFileName(Project1.ProjectInfoFile);
if AFilename='' then
AFilename:=ExtractFileName(Project1.MainFilename);
if AFilename='' then
AFilename:=Trim(Project1.GetTitle);
if AFilename='' then