Made IsInFocusSubTree const, and other minor refactorings.
Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
This commit is contained in:
@@ -33,7 +33,7 @@ namespace AzToolsFramework
|
||||
virtual AZ::EntityId GetFocusRoot() = 0;
|
||||
|
||||
//! Returns whether the entity id provided is part of the focused sub-tree.
|
||||
virtual bool IsInFocusSubTree(AZ::EntityId entityId) = 0;
|
||||
virtual bool IsInFocusSubTree(AZ::EntityId entityId) const = 0;
|
||||
};
|
||||
|
||||
} // namespace AzToolsFramework
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ namespace AzToolsFramework
|
||||
return m_focusRoot;
|
||||
}
|
||||
|
||||
bool FocusModeSystemComponent::IsInFocusSubTree(AZ::EntityId entityId)
|
||||
bool FocusModeSystemComponent::IsInFocusSubTree(AZ::EntityId entityId) const
|
||||
{
|
||||
if (m_focusRoot == AZ::EntityId())
|
||||
{
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ namespace AzToolsFramework
|
||||
void SetFocusRoot(AZ::EntityId entityId) override;
|
||||
void ClearFocusRoot() override;
|
||||
AZ::EntityId GetFocusRoot() override;
|
||||
bool IsInFocusSubTree(AZ::EntityId entityId) override;
|
||||
bool IsInFocusSubTree(AZ::EntityId entityId) const override;
|
||||
|
||||
private:
|
||||
AZ::EntityId m_focusRoot;
|
||||
|
||||
+1
-2
@@ -537,8 +537,7 @@ namespace AzToolsFramework
|
||||
break;
|
||||
}
|
||||
|
||||
AZ::EntityId entityId = GetEntityFromIndex(index);
|
||||
if (!m_focusModeInterface->IsInFocusSubTree(entityId))
|
||||
if (AZ::EntityId entityId = GetEntityFromIndex(index); !m_focusModeInterface->IsInFocusSubTree(entityId))
|
||||
{
|
||||
itemFlags &= !Qt::ItemIsEnabled;
|
||||
}
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ namespace AzToolsFramework
|
||||
}
|
||||
}
|
||||
|
||||
void EntityOutlinerTreeView::leaveEvent(QEvent* /*event*/)
|
||||
void EntityOutlinerTreeView::leaveEvent([[maybe_unused]] QEvent* event)
|
||||
{
|
||||
m_mousePosition = QPoint();
|
||||
}
|
||||
|
||||
@@ -60,6 +60,6 @@ namespace AzToolsFramework
|
||||
|
||||
private:
|
||||
const EditorVisibleEntityDataCache* m_entityDataCache = nullptr; //!< Entity Data queried by the EditorHelpers.
|
||||
FocusModeInterface* m_focusModeInterface = nullptr;
|
||||
const FocusModeInterface* m_focusModeInterface = nullptr;
|
||||
};
|
||||
} // namespace AzToolsFramework
|
||||
|
||||
Reference in New Issue
Block a user