Ignore:
Timestamp:
Jan 19, 2018, 9:28:03 AM (7 years ago)
Author:
chronos
Message:
  • Fixed: Correctly initialize directory and file name in Open/Save dialogs.
  • Fixed: Filter displayed files by project file extension in Open/Save dialogs.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r161 r165  
    283283begin
    284284  OpenDialog1.DefaultExt := ProjectExt;
    285   if Assigned(Core.AcronymDb) then
    286     OpenDialog1.FileName := Core.AcronymDb.FileName;
     285  if Assigned(Core.AcronymDb) then begin
     286    OpenDialog1.InitialDir := ExtractFileDir(Core.AcronymDb.FileName);
     287    OpenDialog1.FileName := ExtractFileName(Core.AcronymDb.FileName);
     288  end;
    287289  if OpenDialog1.Execute then begin
    288290    ProjectOpen(OpenDialog1.FileName);
     
    293295begin
    294296  SaveDialog1.DefaultExt := ProjectExt;
    295   SaveDialog1.FileName := Core.AcronymDb.FileName;
     297  SaveDialog1.InitialDir := ExtractFileDir(Core.AcronymDb.FileName);
     298  SaveDialog1.FileName := ExtractFileName(Core.AcronymDb.FileName);
    296299  if SaveDialog1.Execute then begin
    297300    Core.AcronymDb.SaveToFile(SaveDialog1.FileName);
Note: See TracChangeset for help on using the changeset viewer.