mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-05 23:38:21 +02:00
IDE: when lpk changed on disk: reload lpl files
git-svn-id: trunk@40781 -
This commit is contained in:
parent
d6a1f48258
commit
43469b6441
@ -4463,6 +4463,16 @@ var
|
||||
i: Integer;
|
||||
NewFilename: String;
|
||||
HaveUpdatedGlobalPkgLinks: Boolean;
|
||||
|
||||
procedure UpdateGlobalLinks;
|
||||
begin
|
||||
if not HaveUpdatedGlobalPkgLinks then
|
||||
begin
|
||||
PkgLinks.UpdateGlobalLinks;
|
||||
HaveUpdatedGlobalPkgLinks:=true;
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
ListOfPackages:=nil;
|
||||
MarkNeededPackages;
|
||||
@ -4477,13 +4487,11 @@ begin
|
||||
if FileExistsCached(APackage.Filename) then begin
|
||||
if (not APackage.LPKSource.FileNeedsUpdate) then
|
||||
continue;
|
||||
// a lpk has changed, this might include dependencies => reload lpl files
|
||||
UpdateGlobalLinks;
|
||||
end else begin
|
||||
// lpk has vanished -> search alternative
|
||||
if not HaveUpdatedGlobalPkgLinks then
|
||||
begin
|
||||
PkgLinks.UpdateGlobalLinks;
|
||||
HaveUpdatedGlobalPkgLinks:=true;
|
||||
end;
|
||||
// lpk has vanished -> search alternative => reload lpl files
|
||||
UpdateGlobalLinks;
|
||||
NewFilename:=PackageGraph.FindAlternativeLPK(APackage);
|
||||
end;
|
||||
if ListOfPackages=nil then
|
||||
|
Loading…
Reference in New Issue
Block a user