Fix Editor UI tree control click to handle selection update before
#533
This commit is contained in:
@@ -723,12 +723,6 @@ namespace FlaxEditor.GUI.Tree
|
||||
/// <inheritdoc />
|
||||
public override bool OnMouseUp(Vector2 location, MouseButton button)
|
||||
{
|
||||
// Check if mouse hits bar
|
||||
if (button == MouseButton.Right && TestHeaderHit(ref location))
|
||||
{
|
||||
ParentTree.OnRightClickInternal(this, ref location);
|
||||
}
|
||||
|
||||
// Clear flag for left button
|
||||
if (button == MouseButton.Left)
|
||||
{
|
||||
@@ -773,11 +767,23 @@ namespace FlaxEditor.GUI.Tree
|
||||
Expand();
|
||||
}
|
||||
|
||||
// Check if mouse hits bar
|
||||
if (button == MouseButton.Right && TestHeaderHit(ref location))
|
||||
{
|
||||
ParentTree.OnRightClickInternal(this, ref location);
|
||||
}
|
||||
|
||||
// Handled
|
||||
Focus();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check if mouse hits bar
|
||||
if (button == MouseButton.Right && TestHeaderHit(ref location))
|
||||
{
|
||||
ParentTree.OnRightClickInternal(this, ref location);
|
||||
}
|
||||
|
||||
// Base
|
||||
return base.OnMouseUp(location, button);
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ namespace FlaxEditor.Windows.Assets
|
||||
var newRoot = Object.Find<Actor>(ref newRootId);
|
||||
|
||||
_window.Graph.MainActor = null;
|
||||
_window.Viewport.Instance = null;
|
||||
|
||||
if (SceneGraphFactory.Nodes.TryGetValue(oldRootId, out var oldRootNode))
|
||||
oldRootNode.Dispose();
|
||||
if (SceneGraphFactory.Nodes.TryGetValue(newRootId, out var newRootNode))
|
||||
|
||||
Reference in New Issue
Block a user