mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 20:38:08 +02:00
Packager: Fix adding a package dependency after dropping a component to a form. Issue #36734, patch from Sven Barth.
git-svn-id: trunk@62684 -
This commit is contained in:
parent
da5d437410
commit
e719456735
@ -4333,14 +4333,11 @@ type
|
||||
public
|
||||
PackageNames: TStrings;
|
||||
PackageList: TStrings;
|
||||
DefaultPackage: TLazPackageID;
|
||||
procedure AddDependency(APackageID: TLazPackageID);
|
||||
end;
|
||||
|
||||
procedure TPackageIterateHelper.AddDependency(APackageID: TLazPackageID);
|
||||
begin
|
||||
if Assigned(DefaultPackage) and (APackageID.IDAsString=DefaultPackage.IDAsString) then
|
||||
Exit;
|
||||
{ are we looking for this package? }
|
||||
if PackageNames.IndexOf(APackageID.Name)<0 then
|
||||
Exit;
|
||||
@ -4615,7 +4612,6 @@ begin
|
||||
end;
|
||||
Helper.PackageNames:=CurPackages;
|
||||
Helper.PackageList:=AllPackages;
|
||||
Helper.DefaultPackage:=RequiredPackage;
|
||||
PackageGraph.IteratePackages(fpfSearchAllExisting,@Helper.AddDependency);
|
||||
finally
|
||||
Helper.Free;
|
||||
@ -4656,6 +4652,8 @@ var
|
||||
begin
|
||||
Result:=mrCancel;
|
||||
OutputPackageList:=nil;
|
||||
if (InputPackageList=nil) or (InputPackageList.Count=0) then
|
||||
Exit(mrOK);
|
||||
UnitOwners:=GetOwnersOfUnit(UnitFilename);
|
||||
if (UnitOwners<>nil) then begin
|
||||
for CurOwnerID:=0 to UnitOwners.Count-1 do begin
|
||||
|
Loading…
Reference in New Issue
Block a user