|
|
|
|
@ -43,10 +43,15 @@ namespace AzToolsFramework
|
|
|
|
|
|
|
|
|
|
void PrefabUndoInstance::Undo()
|
|
|
|
|
{
|
|
|
|
|
m_instanceToTemplateInterface->PatchTemplate(m_undoPatch, m_templateId);
|
|
|
|
|
m_instanceToTemplateInterface->PatchTemplate(m_undoPatch, m_templateId, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PrefabUndoInstance::Redo()
|
|
|
|
|
{
|
|
|
|
|
m_instanceToTemplateInterface->PatchTemplate(m_redoPatch, m_templateId, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PrefabUndoInstance::RedoBatched()
|
|
|
|
|
{
|
|
|
|
|
m_instanceToTemplateInterface->PatchTemplate(m_redoPatch, m_templateId);
|
|
|
|
|
}
|
|
|
|
|
@ -91,7 +96,7 @@ namespace AzToolsFramework
|
|
|
|
|
void PrefabUndoEntityUpdate::Undo()
|
|
|
|
|
{
|
|
|
|
|
[[maybe_unused]] bool isPatchApplicationSuccessful =
|
|
|
|
|
m_instanceToTemplateInterface->PatchTemplate(m_undoPatch, m_templateId);
|
|
|
|
|
m_instanceToTemplateInterface->PatchTemplate(m_undoPatch, m_templateId, true);
|
|
|
|
|
|
|
|
|
|
AZ_Error(
|
|
|
|
|
"Prefab", isPatchApplicationSuccessful,
|
|
|
|
|
@ -102,7 +107,7 @@ namespace AzToolsFramework
|
|
|
|
|
void PrefabUndoEntityUpdate::Redo()
|
|
|
|
|
{
|
|
|
|
|
[[maybe_unused]] bool isPatchApplicationSuccessful =
|
|
|
|
|
m_instanceToTemplateInterface->PatchTemplate(m_redoPatch, m_templateId);
|
|
|
|
|
m_instanceToTemplateInterface->PatchTemplate(m_redoPatch, m_templateId, true);
|
|
|
|
|
|
|
|
|
|
AZ_Error(
|
|
|
|
|
"Prefab", isPatchApplicationSuccessful,
|
|
|
|
|
@ -113,7 +118,7 @@ namespace AzToolsFramework
|
|
|
|
|
void PrefabUndoEntityUpdate::Redo(InstanceOptionalReference instanceToExclude)
|
|
|
|
|
{
|
|
|
|
|
[[maybe_unused]] bool isPatchApplicationSuccessful =
|
|
|
|
|
m_instanceToTemplateInterface->PatchTemplate(m_redoPatch, m_templateId, instanceToExclude);
|
|
|
|
|
m_instanceToTemplateInterface->PatchTemplate(m_redoPatch, m_templateId, false, instanceToExclude);
|
|
|
|
|
|
|
|
|
|
AZ_Error(
|
|
|
|
|
"Prefab", isPatchApplicationSuccessful,
|
|
|
|
|
@ -329,7 +334,7 @@ namespace AzToolsFramework
|
|
|
|
|
|
|
|
|
|
//propagate the link changes
|
|
|
|
|
link->get().UpdateTarget();
|
|
|
|
|
m_prefabSystemComponentInterface->PropagateTemplateChanges(link->get().GetTargetTemplateId(), instanceToExclude);
|
|
|
|
|
m_prefabSystemComponentInterface->PropagateTemplateChanges(link->get().GetTargetTemplateId(), false, instanceToExclude);
|
|
|
|
|
|
|
|
|
|
//mark as dirty
|
|
|
|
|
m_prefabSystemComponentInterface->SetTemplateDirtyFlag(link->get().GetTargetTemplateId(), true);
|
|
|
|
|
|