mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 10:59:11 +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}
|
{$EndIf}
|
||||||
TargetEntries[Index].Target := StrAlloc(Length(FormatName) + 1);
|
TargetEntries[Index].Target := StrAlloc(Length(FormatName) + 1);
|
||||||
StrPCopy(TargetEntries[Index].Target, FormatName);
|
StrPCopy(TargetEntries[Index].Target, FormatName);
|
||||||
|
TargetEntries[Index].flags:=0;
|
||||||
TargetEntries[Index].Info:=Index;
|
TargetEntries[Index].Info:=Index;
|
||||||
inc(Index);
|
inc(Index);
|
||||||
end;
|
end;
|
||||||
|
@ -2146,6 +2146,7 @@ end;
|
|||||||
procedure TPkgManager.AddUnitToProjectMainUsesSection(AProject: TProject;
|
procedure TPkgManager.AddUnitToProjectMainUsesSection(AProject: TProject;
|
||||||
const AnUnitName, AnUnitInFilename: string);
|
const AnUnitName, AnUnitInFilename: string);
|
||||||
begin
|
begin
|
||||||
|
DumpStack;
|
||||||
// add unit to project main source file
|
// add unit to project main source file
|
||||||
if (pfMainUnitHasUsesSectionForAllUnits in AProject.Flags)
|
if (pfMainUnitHasUsesSectionForAllUnits in AProject.Flags)
|
||||||
and (AProject.MainUnitInfo<>nil) then begin
|
and (AProject.MainUnitInfo<>nil) then begin
|
||||||
@ -2467,6 +2468,8 @@ begin
|
|||||||
Result:=mrCancel;
|
Result:=mrCancel;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
if OnlyTestIfPossible then
|
||||||
|
exit(mrOk);
|
||||||
// add a dependency for the package to the project
|
// add a dependency for the package to the project
|
||||||
NewDependency:=APackage.CreateDependencyWithOwner(AProject);
|
NewDependency:=APackage.CreateDependencyWithOwner(AProject);
|
||||||
Result:=AddProjectDependency(AProject,NewDependency);
|
Result:=AddProjectDependency(AProject,NewDependency);
|
||||||
|
Loading…
Reference in New Issue
Block a user