Instead of checking if something is a child actor component when attempting to maniuplate it, check if its owner is a CAC instead. If it's owner is a CAC, then it cannot be removed because it is determined by the owning CAC. Before, the code was incorrectly checking if something was just a plain old child actor component, resulting in being unable to delete, reparent, or attach to a child actor component.

#jira UE-117132
#jira UE-117332
#jira UE-117327
#jira UE-117329

#rb marc.audy
#rnx

#preflight 60d48296925f1400010bb909

#ROBOMERGE-SOURCE: CL 16773601 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v836-16769935)

[CL 16773618 by ben hoffman in ue5-release-engine-test branch]
This commit is contained in:
ben hoffman
2021-06-24 10:56:30 -04:00
parent 3510c1d50a
commit 1b38a5881b
8 changed files with 19 additions and 45 deletions
@@ -221,7 +221,7 @@ FSubobjectData* FSubobjectEditorTreeNode::GetDataSource() const
bool FSubobjectEditorTreeNode::IsChildSubtreeNode() const
{
const FSubobjectData* Data = GetDataSource();
return Data ? Data->IsChildActor() : false;
return Data ? Data->IsChildActorSubtreeObject() : false;
}
bool FSubobjectEditorTreeNode::IsAttachedTo(FSubobjectEditorTreeNodePtrType InNodePtr) const
@@ -2685,15 +2685,6 @@ bool SSubobjectEditor::CanDeleteNodes() const
{
return false;
}
else
{
// Don't allow nodes that belong to a child actor template to be deleted
const bool bIsChildActorSubtreeNode = (SelectedNode->GetDataSource()->IsChildActor());
if (bIsChildActorSubtreeNode)
{
return false;
}
}
}
return true;