mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-12 14:00:38 +02:00
IdeIntf: Prevent error "LookupRoot does not match" in ComponentTreeView. Issue #33677.
git-svn-id: trunk@57776 -
This commit is contained in:
parent
8497244873
commit
9f9965c410
@ -177,16 +177,18 @@ procedure TComponentWalker.AddOwnedPersistent(APers: TPersistent;
|
||||
APropName: String; AParentNode: TTreeNode);
|
||||
var
|
||||
TVNode: TTreeNode;
|
||||
TheRoot: TPersistent;
|
||||
begin
|
||||
if (APers is TComponent)
|
||||
and (csDestroying in TComponent(APers).ComponentState) then Exit;
|
||||
Assert(GetLookupRootForComponent(APers) = FLookupRoot,
|
||||
'TComponentWalker.AddOwnedPersistent: LookupRoot does not match.');
|
||||
if PersistentFoundInNode(APers) then Exit;
|
||||
TheRoot := GetLookupRootForComponent(APers);
|
||||
{$IFDEF VerboseComponentTVWalker}
|
||||
DebugLn(['TComponentWalker.AddOwnedPersistent Persistent=',DbgSName(APers),
|
||||
' PropName=',APropName,' FLookupRoot=',DbgSName(FLookupRoot)]);
|
||||
DebugLn(['TComponentWalker.AddOwnedPersistent'+
|
||||
' PropName=',APropName,' Persistent=',DbgSName(APers),
|
||||
' its root=',DbgSName(TheRoot),' FLookupRoot=',DbgSName(FLookupRoot)]);
|
||||
{$ENDIF}
|
||||
if TheRoot <> FLookupRoot then Exit;
|
||||
if PersistentFoundInNode(APers) then Exit;
|
||||
TVNode := FComponentTV.Items.AddChild(AParentNode,
|
||||
FComponentTV.CreateNodeCaption(APers, APropName));
|
||||
TVNode.Data := APers;
|
||||
|
Loading…
Reference in New Issue
Block a user