Resolve minor hover state bugs on the Entity Outlier (branches detect hover state separately from the rest of the columns) (#4977)

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
monroegm-disable-blank-issue-2
Danilo Aimini 4 years ago committed by GitHub
parent 4e6f1981b9
commit 1bc2968330
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -72,7 +72,7 @@ namespace AzToolsFramework
void EntityOutlinerTreeView::leaveEvent([[maybe_unused]] QEvent* event) void EntityOutlinerTreeView::leaveEvent([[maybe_unused]] QEvent* event)
{ {
m_mousePosition = QPoint(); m_mousePosition = QPoint(-1, -1);
m_currentHoveredIndex = QModelIndex(); m_currentHoveredIndex = QModelIndex();
update(); update();
} }
@ -200,7 +200,7 @@ namespace AzToolsFramework
const bool isEnabled = (this->model()->flags(index) & Qt::ItemIsEnabled); const bool isEnabled = (this->model()->flags(index) & Qt::ItemIsEnabled);
const bool isSelected = selectionModel()->isSelected(index); const bool isSelected = selectionModel()->isSelected(index);
const bool isHovered = (index == indexAt(m_mousePosition)) && isEnabled; const bool isHovered = (index == indexAt(m_mousePosition).siblingAtColumn(0)) && isEnabled;
// Paint the branch Selection/Hover Rect // Paint the branch Selection/Hover Rect
PaintBranchSelectionHoverRect(painter, rect, isSelected, isHovered); PaintBranchSelectionHoverRect(painter, rect, isSelected, isHovered);

Loading…
Cancel
Save