Checked for no Entity selected and fixed UI
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
This commit is contained in:
+16
-8
@@ -4965,21 +4965,29 @@ namespace AzToolsFramework
|
||||
|
||||
void EntityPropertyEditor::SetEditorUiEnabled(bool enable)
|
||||
{
|
||||
if (enable)
|
||||
if (!m_selectedEntityIds.empty())
|
||||
{
|
||||
EnableComponentActions(this, m_entityComponentActions);
|
||||
if (enable)
|
||||
{
|
||||
EnableComponentActions(this, m_entityComponentActions);
|
||||
}
|
||||
else
|
||||
{
|
||||
DisableComponentActions(this, m_entityComponentActions);
|
||||
}
|
||||
SetPropertyEditorState(m_gui, enable);
|
||||
|
||||
for (auto componentEditor : m_componentEditors)
|
||||
{
|
||||
AzQtComponents::SetWidgetInteractEnabled(componentEditor, enable);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DisableComponentActions(this, m_entityComponentActions);
|
||||
AzQtComponents::SetWidgetInteractEnabled(m_gui->m_entityDetailsLabel, enable);
|
||||
}
|
||||
m_disabled = !enable;
|
||||
SetPropertyEditorState(m_gui, enable);
|
||||
|
||||
for (auto componentEditor : m_componentEditors)
|
||||
{
|
||||
AzQtComponents::SetWidgetInteractEnabled(componentEditor, enable);
|
||||
}
|
||||
// record the selected state after entering/leaving component mode
|
||||
SaveComponentEditorState();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user