Changeset 9 for trunk/UFormMain.pas


Ignore:
Timestamp:
Apr 22, 2016, 8:35:20 AM (9 years ago)
Author:
chronos
Message:
  • Fixed: Error in open file if previously file was closed.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        22AcronymDecoder.exe
        33AcronymDecoder.lps
         4AcronymDecoder
         5heaptrclog.trc
         6
  • trunk/UFormMain.pas

    r8 r9  
    175175begin
    176176  OpenDialog1.DefaultExt := ProjectExt;
    177   OpenDialog1.FileName := AcronymDb.FileName;
     177  if Assigned(AcronymDb) then
     178    OpenDialog1.FileName := AcronymDb.FileName;
    178179  if OpenDialog1.Execute then begin
     180    AFileClose.Execute;
     181    AFileNew.Execute;
    179182    AcronymDb.LoadFromFile(OpenDialog1.FileName);
    180183    LastOpenedList1.AddItem(OpenDialog1.FileName);
     
    380383  AFileSaveAs.Enabled := Assigned(AcronymDb);
    381384  EditSearch.Enabled := Assigned(AcronymDb);
     385  AImport.Enabled := Assigned(AcronymDb);
    382386
    383387  Title := Application.Title;
Note: See TracChangeset for help on using the changeset viewer.