Changeset 54 for trunk/IDE/UCore.pas


Ignore:
Timestamp:
Jun 26, 2012, 7:41:11 AM (12 years ago)
Author:
chronos
Message:
  • Modified: Project instance is now freed in closed state.
  • Added: Toolbar button Open now provide dropdown list of recent opened projects.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IDE/UCore.pas

    r53 r54  
    3636    procedure ProjectTemplatesInit;
    3737    procedure ProjectOpen(FileName: string);
     38    procedure ProjectNew;
    3839    procedure CompilerDebugLog(Text: string);
    3940    procedure LoadFromRegistry(Root: HKEY; Key: string);
     
    5556procedure TCore.ProjectOpen(FileName: string);
    5657begin
    57   Project.Active := True;
     58  ProjectNew;
    5859  Project.LoadFromFile(FileName);
    5960  LastOpenedFiles.AddItem(FileName);
    6061  FormMain.UpdateInterface;
     62end;
     63
     64procedure TCore.ProjectNew;
     65begin
     66  if Assigned(Project) then FreeAndNil(Project);
     67  Project := TProject.Create;
     68  Project.FileName := SNewProject;
    6169end;
    6270
     
    97105begin
    98106  LastOpenedFiles.LoadToMenuItem(FormMain.MenuItemOpenRecent,
     107    FormMain.OpenRecentClick);
     108  LastOpenedFiles.LoadToMenuItem(FormMain.PopupMenu1.Items,
    99109    FormMain.OpenRecentClick);
    100110end;
Note: See TracChangeset for help on using the changeset viewer.