mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-06 11:26:00 +02:00
IDE: fixed unit flag indirectly used by designer, bug #12553
git-svn-id: trunk@17425 -
This commit is contained in:
parent
c57891fc93
commit
b3ad804aa7
@ -6110,7 +6110,7 @@ begin
|
||||
DebugLn(['TMainIDE.CloseUnitComponent ',AnUnitInfo.Filename,' ',dbgsName(LookupRoot)]);
|
||||
{$ENDIF}
|
||||
|
||||
Project1.LockUnitComponentDependencies;
|
||||
Project1.LockUnitComponentDependencies; // avoid circles
|
||||
try
|
||||
// save
|
||||
if (cfSaveFirst in Flags) and (AnUnitInfo.EditorIndex>=0)
|
||||
@ -6269,6 +6269,7 @@ begin
|
||||
Project1.UpdateUnitComponentDependencies;
|
||||
if Project1.UnitComponentIsUsed(AnUnitInfo,CheckHasDesigner) then
|
||||
exit(true);
|
||||
//DebugLn(['TMainIDE.UnitComponentIsUsed ',AnUnitInfo.Filename,' ',dbgs(AnUnitInfo.Flags)]);
|
||||
end;
|
||||
|
||||
function TMainIDE.GetAncestorUnit(AnUnitInfo: TUnitInfo): TUnitInfo;
|
||||
|
@ -1144,7 +1144,7 @@ procedure TUnitInfo.WriteDebugReportUnitComponentDependencies(Prefix: string);
|
||||
var
|
||||
Dependency: TUnitComponentDependency;
|
||||
begin
|
||||
DebugLn([Prefix+'TUnitInfo.WriteDebugReportUnitComponentDependencies ',Filename]);
|
||||
DebugLn([Prefix+'TUnitInfo.WriteDebugReportUnitComponentDependencies ',Filename,' ',dbgs(Flags)]);
|
||||
Dependency:=FirstRequiredComponent;
|
||||
if Dependency<>nil then begin
|
||||
DebugLn([Prefix+' Requires: >>> ']);
|
||||
@ -3734,7 +3734,7 @@ procedure TProject.UpdateUnitComponentDependencies;
|
||||
until TypeInfo=nil;
|
||||
end;
|
||||
|
||||
procedure DFSUsedByDesigner(AnUnitInfo, IgnoreUnitInfo: TUnitInfo);
|
||||
procedure DFSRequiredDesigner(AnUnitInfo, IgnoreUnitInfo: TUnitInfo);
|
||||
var
|
||||
Dependency: TUnitComponentDependency;
|
||||
UsingUnitInfo: TUnitInfo;
|
||||
@ -3743,19 +3743,19 @@ procedure TProject.UpdateUnitComponentDependencies;
|
||||
or (uifMarked in AnUnitInfo.FFlags) then
|
||||
exit;
|
||||
Include(AnUnitInfo.FFlags,uifMarked);
|
||||
Dependency:=AnUnitInfo.FirstUsedByComponent;
|
||||
Dependency:=AnUnitInfo.FirstRequiredComponent;
|
||||
while Dependency<>nil do begin
|
||||
UsingUnitInfo:=Dependency.UsedByUnit;
|
||||
UsingUnitInfo:=Dependency.RequiresUnit;
|
||||
if (UsingUnitInfo<>IgnoreUnitInfo)
|
||||
and (not (uifComponentIndirectlyUsedByDesigner in UsingUnitInfo.FFlags))
|
||||
then begin
|
||||
{$IFDEF VerboseIDEMultiForm}
|
||||
DebugLn(['TProject.UpdateUnitComponentDependencies.DFSUsedByDesigner designer of ',UsingUnitInfo.Filename,' uses ',AnUnitInfo.Filename]);
|
||||
DebugLn(['TProject.UpdateUnitComponentDependencies.DFSRequiredDesigner designer of ',AnUnitInfo.Filename,' uses ',UsingUnitInfo.Filename]);
|
||||
{$ENDIF}
|
||||
Include(UsingUnitInfo.FFlags,uifComponentIndirectlyUsedByDesigner);
|
||||
DFSUsedByDesigner(UsingUnitInfo,IgnoreUnitInfo);
|
||||
DFSRequiredDesigner(UsingUnitInfo,IgnoreUnitInfo);
|
||||
end;
|
||||
Dependency:=Dependency.NextUsedByDependency;
|
||||
Dependency:=Dependency.NextRequiresDependency;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -3808,7 +3808,7 @@ begin
|
||||
begin
|
||||
// mark all that use indirectly this designer
|
||||
Exclude(AnUnitInfo.FFlags,uifMarked);
|
||||
DFSUsedByDesigner(AnUnitInfo,AnUnitInfo);
|
||||
DFSRequiredDesigner(AnUnitInfo,AnUnitInfo);
|
||||
end;
|
||||
AnUnitInfo:=AnUnitInfo.NextUnitWithComponent;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user