LYN-7539 + LYN-7541 | Focus Mode - Show prefab names and dirty markers instead of instance names in breadcrumbs (#4850)
* Change Prefab Focus breadcrumb widget to display template filename instead of instance container entity name. Also display dirty state for the template (*) and refresh it in real time. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Streamline path creation code; fix stem retrieval to ensure extension is cut correctly; delay refresh one frame when path is clicked to correctly refresh it. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Remove test code. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Simplify code to use Native directly. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> * Minor variable renaming and comment adjustments to make them clearer. Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
This commit is contained in:
@@ -185,7 +185,7 @@ namespace AzToolsFramework
|
||||
if (AZ::JsonSerialization::Compare(templateDomToUpdate, updatedDom) != AZ::JsonSerializerCompareResult::Equal)
|
||||
{
|
||||
templateDomToUpdate.CopyFrom(updatedDom, templateDomToUpdate.GetAllocator());
|
||||
templateToUpdate->get().MarkAsDirty(true);
|
||||
SetTemplateDirtyFlag(templateId, true);
|
||||
PropagateTemplateChanges(templateId);
|
||||
}
|
||||
}
|
||||
@@ -813,11 +813,12 @@ namespace AzToolsFramework
|
||||
|
||||
void PrefabSystemComponent::SetTemplateDirtyFlag(TemplateId templateId, bool dirty)
|
||||
{
|
||||
auto templateRef = FindTemplate(templateId);
|
||||
|
||||
if (templateRef.has_value())
|
||||
if (auto templateReference = FindTemplate(templateId); templateReference.has_value())
|
||||
{
|
||||
templateRef->get().MarkAsDirty(dirty);
|
||||
templateReference->get().MarkAsDirty(dirty);
|
||||
|
||||
PrefabPublicNotificationBus::Broadcast(
|
||||
&PrefabPublicNotificationBus::Events::OnPrefabTemplateDirtyFlagUpdated, templateId, dirty);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user