mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-11 16:56:01 +02:00
fixed auto adding package to project on popupmenu
git-svn-id: trunk@8598 -
This commit is contained in:
parent
aa95eef759
commit
4914273463
@ -607,6 +607,7 @@ var TargetEntries: PGtkTargetEntry;
|
||||
{$EndIf}
|
||||
TargetEntries[Index].Target := StrAlloc(Length(FormatName) + 1);
|
||||
StrPCopy(TargetEntries[Index].Target, FormatName);
|
||||
TargetEntries[Index].flags:=0;
|
||||
TargetEntries[Index].Info:=Index;
|
||||
inc(Index);
|
||||
end;
|
||||
|
@ -2146,6 +2146,7 @@ end;
|
||||
procedure TPkgManager.AddUnitToProjectMainUsesSection(AProject: TProject;
|
||||
const AnUnitName, AnUnitInFilename: string);
|
||||
begin
|
||||
DumpStack;
|
||||
// add unit to project main source file
|
||||
if (pfMainUnitHasUsesSectionForAllUnits in AProject.Flags)
|
||||
and (AProject.MainUnitInfo<>nil) then begin
|
||||
@ -2467,6 +2468,8 @@ begin
|
||||
Result:=mrCancel;
|
||||
exit;
|
||||
end;
|
||||
if OnlyTestIfPossible then
|
||||
exit(mrOk);
|
||||
// add a dependency for the package to the project
|
||||
NewDependency:=APackage.CreateDependencyWithOwner(AProject);
|
||||
Result:=AddProjectDependency(AProject,NewDependency);
|
||||
|
Loading…
Reference in New Issue
Block a user