Add Unit tests for EditorFocusMode and PrefabFocus. Minor change to PrefabFocusHandler to avoid instantiating a new AZ::EntityId() for checks.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
This commit is contained in:
Danilo Aimini
2021-09-24 15:05:34 -07:00
parent 66a875bf79
commit 72110e40cf
4 changed files with 317 additions and 2 deletions
@@ -35,7 +35,7 @@ namespace AzToolsFramework::Prefab
{
InstanceOptionalReference focusedInstance;
if (entityId == AZ::EntityId())
if (entityId == static_cast<AZ::EntityId>(AZ::EntityId::InvalidEntityId))
{
PrefabEditorEntityOwnershipInterface* prefabEditorEntityOwnershipInterface =
AZ::Interface<PrefabEditorEntityOwnershipInterface>::Get();
@@ -89,7 +89,7 @@ namespace AzToolsFramework::Prefab
return false;
}
if (entityId == AZ::EntityId())
if (entityId == static_cast<AZ::EntityId>(AZ::EntityId::InvalidEntityId))
{
return false;
}