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:
-15
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user