Remove Prefab cache undo node generation for container entities - will move that work to a separate PR.

This commit is contained in:
daimini
2021-04-22 09:47:18 -07:00
parent 67fa4a332b
commit cf4bbe569b
@@ -388,24 +388,12 @@ void PrefabPublicHandler::GenerateUndoNodesForEntityChangeAndUpdateCache(
if (patch.IsArray() && !patch.Empty() && beforeState.IsObject())
{
if (IsInstanceContainerEntity(entityId) && !IsLevelInstanceContainerEntity(entityId))
{
// Save these changes as patches to the link
PrefabUndoLinkUpdate* linkUpdate = aznew PrefabUndoLinkUpdate(AZStd::to_string(static_cast<AZ::u64>(entityId)));
linkUpdate->SetParent(parentUndoBatch);
linkUpdate->Capture(patch, owningInstance->get().GetLinkId());
// Update the state of the entity
PrefabUndoEntityUpdate* state = aznew PrefabUndoEntityUpdate(AZStd::to_string(static_cast<AZ::u64>(entityId)));
state->SetParent(parentUndoBatch);
state->Capture(beforeState, afterState, entityId);
linkUpdate->Redo();
}
else
{
// Update the state of the entity
PrefabUndoEntityUpdate* state = aznew PrefabUndoEntityUpdate(AZStd::to_string(static_cast<AZ::u64>(entityId)));
state->SetParent(parentUndoBatch);
state->Capture(beforeState, afterState, entityId);
state->Redo();
}
state->Redo();
}
// Update the cache