project groups: new group: add current project

git-svn-id: trunk@50358 -
This commit is contained in:
mattias 2015-11-17 11:48:36 +00:00
parent 68baa62193
commit c97a53a9ba

View File

@ -206,11 +206,20 @@ begin
end; end;
procedure TIDEProjectGroupManager.DoNewClick(Sender: TObject); procedure TIDEProjectGroupManager.DoNewClick(Sender: TObject);
var
AProject: TLazProject;
begin begin
if Not CheckSaved then if Not CheckSaved then
Exit; Exit;
FreeAndNil(FProjectGroup); FreeAndNil(FProjectGroup);
FProjectGroup:=TIDEProjectGroup.Create; FProjectGroup:=TIDEProjectGroup.Create;
// add current project
AProject:=LazarusIDE.ActiveProject;
if (AProject<>nil) and FilenameIsAbsolute(AProject.ProjectInfoFile)
and FileExistsCached(AProject.ProjectInfoFile) then
FProjectGroup.AddTarget(AProject.ProjectInfoFile);
ShowProjectGroupEditor; ShowProjectGroupEditor;
end; end;