IDE: delete form component: checking if it is a nested/inline component

git-svn-id: trunk@15696 -
This commit is contained in:
mattias 2008-07-07 15:31:08 +00:00
parent 63efe33bc3
commit a1681f0ae4

View File

@ -1820,6 +1820,15 @@ begin
if AComponent=nil then exit;
CurRoot:=AComponent.Owner;
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
// search in next ancestor
AncestorRoot:=GetAncestorInstance(CurRoot);