Fix cached DraggedOverNode to be properly reset after drag and #996

This commit is contained in:
Wojtek Figat
2023-04-17 13:06:56 +02:00
parent 7ad497ca3b
commit 378e48e7aa

View File

@@ -922,7 +922,8 @@ namespace FlaxEditor.GUI.Tree
if (result == DragDropEffect.None)
{
UpdateDrawPositioning(ref location);
_tree.DraggedOverNode = this;
if (ParentTree != null)
ParentTree.DraggedOverNode = this;
// Check if mouse is over header
_isDragOverHeader = TestHeaderHit(ref location);
@@ -1000,6 +1001,8 @@ namespace FlaxEditor.GUI.Tree
// Clear cache
_isDragOverHeader = false;
_dragOverMode = DragItemPositioning.None;
if (ParentTree != null)
ParentTree.DraggedOverNode = null;
return result;
}