Changeset 134 for trunk/Forms
- Timestamp:
- Mar 5, 2022, 9:27:57 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r133 r134 187 187 SCloseProjectFirst = 'Project need to be closed before it can be openned'; 188 188 SError = 'Error'; 189 SFileNotFound = 'File %s not found.'; 189 190 190 191 { TFormMain } … … 196 197 PageControlMain.TabIndex := 0; 197 198 try 198 if Core.OpenProjectOnStart and (Core.LastOpenedList.Items.Count > 0) then 199 if Core.OpenProjectOnStart and (Core.LastOpenedList.Items.Count > 0) and 200 FileExists(Core.LastOpenedList.Items[0]) then 199 201 ProjectOpen(Core.LastOpenedList.Items[0]) 200 202 else AProjectNew.Execute; … … 669 671 670 672 procedure TFormMain.AProjectOpenRecentExecute(Sender: TObject); 671 begin 672 AProjectClose.Execute; 673 if Core.Project.Openned then Exit; 674 ProjectOpen(Core.LastOpenedList.Items[TMenuItem(Sender).MenuIndex]); 673 var 674 FileName: string; 675 begin 676 FileName := Core.LastOpenedList.Items[TMenuItem(Sender).MenuIndex]; 677 if FileExists(FileName) then begin 678 AProjectClose.Execute; 679 if Core.Project.Openned then Exit; 680 ProjectOpen(FileName); 681 end else ShowMessage(Format(SFileNotFound, [FileName])); 675 682 end; 676 683
Note:
See TracChangeset
for help on using the changeset viewer.