Fix tree node not expanding on drag over arrow.

This commit is contained in:
Chandler Cox
2026-01-28 20:04:39 -06:00
parent f773a0755d
commit d9f9401c5a

View File

@@ -1140,8 +1140,11 @@ namespace FlaxEditor.GUI.Tree
ParentTree.DraggedOverNode = this;
// Expand node if mouse goes over arrow
if (ArrowRect.Contains(location) && HasAnyVisibleChild)
if (ArrowRect.Contains(location) && HasAnyVisibleChild && IsCollapsed)
{
Expand(true);
ParentTree?.FlushPendingPerformLayout();
}
result = OnDragEnterHeader(data);
}
@@ -1172,8 +1175,11 @@ namespace FlaxEditor.GUI.Tree
ParentTree.DraggedOverNode = this;
// Expand node if mouse goes over arrow
if (ArrowRect.Contains(location) && HasAnyVisibleChild)
if (ArrowRect.Contains(location) && HasAnyVisibleChild && IsCollapsed)
{
Expand(true);
ParentTree?.FlushPendingPerformLayout();
}
if (!_isDragOverHeader)
result = OnDragEnterHeader(data);