Format code

#3526
This commit is contained in:
Wojtek Figat
2025-06-16 14:48:18 +02:00
parent a05ca12770
commit a6a2fd2c66
2 changed files with 10 additions and 8 deletions

View File

@@ -92,14 +92,15 @@ namespace FlaxEditor.Windows
_tree.SelectedChanged += Tree_OnSelectedChanged;
_tree.RightClick += OnTreeRightClick;
_tree.Parent = _sceneTreePanel;
_tree.OnDeferedLayout += () => {
if(_forceScrollNodeToView)
_tree.AfterDeferredLayout += () =>
{
if (_forceScrollNodeToView)
{
_forceScrollNodeToView = false;
ScrollToSelectedNode();
}
};
headerPanel.Parent = this;
// Setup input actions
@@ -151,9 +152,10 @@ namespace FlaxEditor.Windows
root.TreeNode.UpdateFilter(query);
_tree.UnlockChildrenRecursive();
// When keep the selected nodes in a view
var nodeSelection = _tree.Selection;
if(nodeSelection.Count != 0)
if (nodeSelection.Count != 0)
{
var node = nodeSelection[nodeSelection.Count - 1];
node.Expand(true);