* Set initial directory to project directory

This commit is contained in:
Michaël Van Canneyt 2022-06-14 20:14:03 +02:00
parent 7568b05082
commit 853114ab51

View File

@ -158,13 +158,16 @@ begin
end;
{ TSQLDBRestSchemaComponentEditor }
Function GetFileName(var aFileName : UTF8String; aFilters : UTF8String; ForSave : Boolean = False) : Boolean;
Var
Dlg : TFileDialog;
aDir : String;
begin
aDir:=ExtractFilePath(LazarusIDE.ActiveProject.ProjectInfoFile);
if forSave then
begin
DLG:=TSaveDialog.Create(Application);
@ -178,6 +181,7 @@ begin
Options:=Options+[ofFileMustExist];
end;
try
DLG.InitialDir:=aDir;
DLG.FileName:=aFileName;
DLG.Filter:=aFilters;
DLG.DefaultExt:=ExtractFileExt(aFileName);