Renamed variable to be more descriptive.
Signed-off-by: Chris Galvan <chgalvan@amazon.com>
This commit is contained in:
+8
-8
@@ -977,7 +977,7 @@ namespace AzToolsFramework
|
|||||||
m_gui->m_entityDetailsLabel->setVisible(false);
|
m_gui->m_entityDetailsLabel->setVisible(false);
|
||||||
|
|
||||||
// If we're in edit mode, make the name field editable.
|
// If we're in edit mode, make the name field editable.
|
||||||
m_gui->m_entityNameEditor->setReadOnly(!m_gui->m_componentListContents->isEnabled() || m_entityIsReadOnly);
|
m_gui->m_entityNameEditor->setReadOnly(!m_gui->m_componentListContents->isEnabled() || m_selectionContainsReadOnlyEntity);
|
||||||
|
|
||||||
// get the name of the entity.
|
// get the name of the entity.
|
||||||
auto entity = GetSelectedEntityById(entityId);
|
auto entity = GetSelectedEntityById(entityId);
|
||||||
@@ -1066,7 +1066,7 @@ namespace AzToolsFramework
|
|||||||
|
|
||||||
bool EntityPropertyEditor::CanAddComponentsToSelection(const SelectionEntityTypeInfo& selectionEntityTypeInfo) const
|
bool EntityPropertyEditor::CanAddComponentsToSelection(const SelectionEntityTypeInfo& selectionEntityTypeInfo) const
|
||||||
{
|
{
|
||||||
if (m_entityIsReadOnly)
|
if (m_selectionContainsReadOnlyEntity)
|
||||||
{
|
{
|
||||||
// Can't add components if there is a read only entity in the selection
|
// Can't add components if there is a read only entity in the selection
|
||||||
return false;
|
return false;
|
||||||
@@ -1137,12 +1137,12 @@ namespace AzToolsFramework
|
|||||||
GetSelectedEntities(m_selectedEntityIds);
|
GetSelectedEntities(m_selectedEntityIds);
|
||||||
|
|
||||||
// Check if any of the selected entities are marked as read only
|
// Check if any of the selected entities are marked as read only
|
||||||
m_entityIsReadOnly = false;
|
m_selectionContainsReadOnlyEntity = false;
|
||||||
for (const auto& entityId : m_selectedEntityIds)
|
for (const auto& entityId : m_selectedEntityIds)
|
||||||
{
|
{
|
||||||
if (m_readOnlyEntityPublicInterface->IsReadOnly(entityId))
|
if (m_readOnlyEntityPublicInterface->IsReadOnly(entityId))
|
||||||
{
|
{
|
||||||
m_entityIsReadOnly = true;
|
m_selectionContainsReadOnlyEntity = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1703,7 +1703,7 @@ namespace AzToolsFramework
|
|||||||
componentEditor->InvalidateAll(!componentInFilter ? m_filterString.c_str() : nullptr);
|
componentEditor->InvalidateAll(!componentInFilter ? m_filterString.c_str() : nullptr);
|
||||||
|
|
||||||
// If we are in read only mode, then show the components as disabled
|
// If we are in read only mode, then show the components as disabled
|
||||||
if (m_entityIsReadOnly)
|
if (m_selectionContainsReadOnlyEntity)
|
||||||
{
|
{
|
||||||
componentEditor->mockDisabledState(true);
|
componentEditor->mockDisabledState(true);
|
||||||
}
|
}
|
||||||
@@ -3104,7 +3104,7 @@ namespace AzToolsFramework
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_gui->m_statusComboBox->setDisabled(m_entityIsReadOnly);
|
m_gui->m_statusComboBox->setDisabled(m_selectionContainsReadOnlyEntity);
|
||||||
m_gui->m_statusComboBox->setVisible(!m_isSystemEntityEditor && !m_isLevelEntityEditor);
|
m_gui->m_statusComboBox->setVisible(!m_isSystemEntityEditor && !m_isLevelEntityEditor);
|
||||||
m_gui->m_statusComboBox->style()->unpolish(m_gui->m_statusComboBox);
|
m_gui->m_statusComboBox->style()->unpolish(m_gui->m_statusComboBox);
|
||||||
m_gui->m_statusComboBox->style()->polish(m_gui->m_statusComboBox);
|
m_gui->m_statusComboBox->style()->polish(m_gui->m_statusComboBox);
|
||||||
@@ -3333,7 +3333,7 @@ namespace AzToolsFramework
|
|||||||
|
|
||||||
const bool hasComponents = !m_selectedEntityIds.empty() && !componentsToEdit.empty();
|
const bool hasComponents = !m_selectedEntityIds.empty() && !componentsToEdit.empty();
|
||||||
// Don't allow components to be removed/cut/enabled/disabled if read only
|
// Don't allow components to be removed/cut/enabled/disabled if read only
|
||||||
const bool allowRemove = hasComponents && AreComponentsRemovable(componentsToEdit) && !m_entityIsReadOnly;
|
const bool allowRemove = hasComponents && AreComponentsRemovable(componentsToEdit) && !m_selectionContainsReadOnlyEntity;
|
||||||
const bool allowCopy = hasComponents && AreComponentsCopyable(componentsToEdit);
|
const bool allowCopy = hasComponents && AreComponentsCopyable(componentsToEdit);
|
||||||
|
|
||||||
m_actionToDeleteComponents->setEnabled(allowRemove);
|
m_actionToDeleteComponents->setEnabled(allowRemove);
|
||||||
@@ -3395,7 +3395,7 @@ namespace AzToolsFramework
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_entityIsReadOnly)
|
if (m_selectionContainsReadOnlyEntity)
|
||||||
{
|
{
|
||||||
// Can't paste components if there is a read only entity in the selection
|
// Can't paste components if there is a read only entity in the selection
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
+1
-1
@@ -625,7 +625,7 @@ namespace AzToolsFramework
|
|||||||
bool m_prefabsAreEnabled = false;
|
bool m_prefabsAreEnabled = false;
|
||||||
|
|
||||||
ReadOnlyEntityPublicInterface* m_readOnlyEntityPublicInterface = nullptr;
|
ReadOnlyEntityPublicInterface* m_readOnlyEntityPublicInterface = nullptr;
|
||||||
bool m_entityIsReadOnly = false;
|
bool m_selectionContainsReadOnlyEntity = false;
|
||||||
|
|
||||||
// Reordering row widgets within the RPE.
|
// Reordering row widgets within the RPE.
|
||||||
static constexpr float MoveFadeSeconds = 0.5f;
|
static constexpr float MoveFadeSeconds = 0.5f;
|
||||||
|
|||||||
Reference in New Issue
Block a user