IDEIntf: component treeview: csOwnedChildsSelectable

git-svn-id: trunk@22845 -
This commit is contained in:
mattias 2009-11-28 00:31:25 +00:00
parent 446308e0f5
commit 9a2a11741e
2 changed files with 7 additions and 8 deletions

View File

@ -442,12 +442,8 @@ begin
{$ENDIF}
OldRoot:=Root;
try
if csInline in Child.ComponentState then begin
if csInline in Child.ComponentState then
Root:=Child;
if (Control<>nil)
and (not (csOwnedChildsSelectable in Control.ControlStyle)) then
exit;
end;
{$IFDEF VerboseDesignerSelect}
DebugLn(['TComponentSearch.Gather Root=',DbgSName(Root)]);
{$ENDIF}

View File

@ -139,11 +139,14 @@ begin
FNode.ImageIndex := FTreeView.GetImageFor(AComponent);
FNode.SelectedIndex := FNode.ImageIndex;
FNode.MultiSelected := FTreeView.Selection.IndexOf(AComponent) >= 0;
if csInline in AComponent.ComponentState then
if (csInline in AComponent.ComponentState) or (AComponent.Owner=nil) then
Root := AComponent
else
Root := FRootComponent;
TComponentAccessor(AComponent).GetChildren(@Walk, Root);
Root := AComponent.Owner;
if not ((Root is TControl)
and (not (csOwnedChildsSelectable in TControl(Root).ControlStyle)))
then
TComponentAccessor(AComponent).GetChildren(@Walk, Root);
FNode := OldNode;
FNode.Expanded := True;
end;