mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 22:19:18 +02:00
IDE: delete form component: checking if it is a nested/inline component
git-svn-id: trunk@15696 -
This commit is contained in:
parent
63efe33bc3
commit
a1681f0ae4
@ -1820,6 +1820,15 @@ begin
|
|||||||
if AComponent=nil then exit;
|
if AComponent=nil then exit;
|
||||||
CurRoot:=AComponent.Owner;
|
CurRoot:=AComponent.Owner;
|
||||||
if CurRoot=nil then exit;
|
if CurRoot=nil then exit;
|
||||||
|
|
||||||
|
if csInline in CurRoot.ComponentState then begin
|
||||||
|
// inline/embedded components (e.g. nested frame)
|
||||||
|
CurRoot:=FindJITComponentByClass(TComponentClass(CurRoot.ClassType));
|
||||||
|
if CurRoot=nil then exit;
|
||||||
|
if CurRoot.FindComponent(AComponent.Name)=nil then exit;
|
||||||
|
Result:=CurRoot;
|
||||||
|
end;
|
||||||
|
|
||||||
repeat
|
repeat
|
||||||
// search in next ancestor
|
// search in next ancestor
|
||||||
AncestorRoot:=GetAncestorInstance(CurRoot);
|
AncestorRoot:=GetAncestorInstance(CurRoot);
|
||||||
|
Loading…
Reference in New Issue
Block a user