From a1681f0ae4baf9cd35535c457cc591f1f7928c09 Mon Sep 17 00:00:00 2001 From: mattias Date: Mon, 7 Jul 2008 15:31:08 +0000 Subject: [PATCH] IDE: delete form component: checking if it is a nested/inline component git-svn-id: trunk@15696 - --- ide/customformeditor.pp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ide/customformeditor.pp b/ide/customformeditor.pp index 4a84232419..469183ab1c 100644 --- a/ide/customformeditor.pp +++ b/ide/customformeditor.pp @@ -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);