Fix update order inconsistencies between machines by exposing an action for when defered layout happens.
This commit is contained in:
@@ -92,6 +92,13 @@ namespace FlaxEditor.Windows
|
||||
_tree.SelectedChanged += Tree_OnSelectedChanged;
|
||||
_tree.RightClick += OnTreeRightClick;
|
||||
_tree.Parent = _sceneTreePanel;
|
||||
_tree.OnDeferedLayout += () => {
|
||||
if(_tree.Selection.Count != 0 && _forceScrollNodeToView)
|
||||
{
|
||||
_forceScrollNodeToView = false;
|
||||
ScrollToSelectedNode();
|
||||
}
|
||||
};
|
||||
headerPanel.Parent = this;
|
||||
|
||||
// Setup input actions
|
||||
@@ -156,18 +163,6 @@ namespace FlaxEditor.Windows
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Update(float deltaTime)
|
||||
{
|
||||
base.Update(deltaTime);
|
||||
|
||||
if(_tree.Selection.Count != 0 && _forceScrollNodeToView)
|
||||
{
|
||||
_forceScrollNodeToView = false;
|
||||
ScrollToSelectedNode();
|
||||
}
|
||||
}
|
||||
|
||||
private void Spawn(Type type)
|
||||
{
|
||||
// Create actor
|
||||
|
||||
Reference in New Issue
Block a user