mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-21 21:08:18 +02:00
* Set initial directory to project directory
This commit is contained in:
parent
7568b05082
commit
853114ab51
@ -158,13 +158,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ TSQLDBRestSchemaComponentEditor }
|
{ TSQLDBRestSchemaComponentEditor }
|
||||||
|
|
||||||
Function GetFileName(var aFileName : UTF8String; aFilters : UTF8String; ForSave : Boolean = False) : Boolean;
|
Function GetFileName(var aFileName : UTF8String; aFilters : UTF8String; ForSave : Boolean = False) : Boolean;
|
||||||
|
|
||||||
|
|
||||||
Var
|
Var
|
||||||
Dlg : TFileDialog;
|
Dlg : TFileDialog;
|
||||||
|
aDir : String;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
aDir:=ExtractFilePath(LazarusIDE.ActiveProject.ProjectInfoFile);
|
||||||
if forSave then
|
if forSave then
|
||||||
begin
|
begin
|
||||||
DLG:=TSaveDialog.Create(Application);
|
DLG:=TSaveDialog.Create(Application);
|
||||||
@ -178,6 +181,7 @@ begin
|
|||||||
Options:=Options+[ofFileMustExist];
|
Options:=Options+[ofFileMustExist];
|
||||||
end;
|
end;
|
||||||
try
|
try
|
||||||
|
DLG.InitialDir:=aDir;
|
||||||
DLG.FileName:=aFileName;
|
DLG.FileName:=aFileName;
|
||||||
DLG.Filter:=aFilters;
|
DLG.Filter:=aFilters;
|
||||||
DLG.DefaultExt:=ExtractFileExt(aFileName);
|
DLG.DefaultExt:=ExtractFileExt(aFileName);
|
||||||
|
Loading…
Reference in New Issue
Block a user