Revert part of the fix as it would break unit tests. Verified the remaining code still achieves the same purpose on the UI side without impacting the backend.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
This commit is contained in:
Danilo Aimini
2021-12-10 15:06:55 -08:00
parent 502578293b
commit c06b697c6b
@@ -670,21 +670,6 @@ namespace AzToolsFramework
return;
}
// Don't allow read-only entities to be re-parented at all.
// Also don't allow entities to be parented under read-only entities.
if (auto readOnlyEntityPublicInterface = AZ::Interface<ReadOnlyEntityPublicInterface>::Get();
readOnlyEntityPublicInterface->IsReadOnly(GetEntityId()) || readOnlyEntityPublicInterface->IsReadOnly(parentId))
{
return;
}
// Don't allow entities to be parented under closed containers.
if (auto containerEntityInterface = AZ::Interface<ContainerEntityInterface>::Get();
!containerEntityInterface->IsContainerOpen(parentId))
{
return;
}
auto oldParentId = m_parentEntityId;
bool canChangeParent = true;