mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 22:58:50 +02:00
IDE: fixed checking for package provides when adding a component to a form
git-svn-id: trunk@13981 -
This commit is contained in:
parent
4fb9eb99e3
commit
609b0b0a2d
@ -815,8 +815,10 @@ function TLazPackageGraph.FindPackageProvidingName(
|
||||
function Search(ADependency: TPkgDependency; out Found: TLazPackage
|
||||
): boolean;
|
||||
begin
|
||||
Found:=nil;
|
||||
while ADependency<>nil do begin
|
||||
Found:=ADependency.RequiredPackage;
|
||||
//DebugLn(['Search ',Found.Name,' ',Found.ProvidesPackage(Name),' "',Found.Provides.Text,'"']);
|
||||
if (Found<>nil) and (not (lpfVisited in Found.Flags)) then begin
|
||||
Found.Flags:=Found.Flags+[lpfVisited];
|
||||
if Found.ProvidesPackage(Name)
|
||||
@ -830,7 +832,7 @@ function TLazPackageGraph.FindPackageProvidingName(
|
||||
|
||||
begin
|
||||
MarkAllPackagesAsNotVisited;
|
||||
Result:=nil;
|
||||
Search(FirstDependency,Result);
|
||||
end;
|
||||
|
||||
function TLazPackageGraph.FindUnit(StartPackage: TLazPackage;
|
||||
|
@ -3001,6 +3001,8 @@ begin
|
||||
and (RequiredPackage<>UnitOwner)
|
||||
and (FindCompatibleDependencyInList(FirstDependency,pdlRequires,
|
||||
RequiredPackage)=nil)
|
||||
and (PackageGraph.FindPackageProvidingName(FirstDependency,
|
||||
RequiredPackage.Name)=nil)
|
||||
then begin
|
||||
if List=nil then List:=TObjectArray.Create;
|
||||
List.AddObject(UnitOwner,RequiredPackage);
|
||||
|
Loading…
Reference in New Issue
Block a user