Added scene panel to seperate the tree from the search bar and made the tree not able to scroll when renaming

This commit is contained in:
Chandler Cox
2022-10-10 15:38:30 -05:00
parent 52904cbe3e
commit 95e60ea68e
2 changed files with 37 additions and 4 deletions

View File

@@ -273,15 +273,26 @@ namespace FlaxEditor.SceneGraph.GUI
Select();
// disable scrolling of scene view
Editor.Instance.Windows.SceneWin.ScrollingOnSceneTreeView(false);
// Start renaming the actor
var dialog = RenamePopup.Show(this, HeaderRect, _actorNode.Name, false);
dialog.Renamed += OnRenamed;
dialog.Closed += popup =>
{
// enable scrolling of scene view
Editor.Instance.Windows.SceneWin.ScrollingOnSceneTreeView(true);
};
}
private void OnRenamed(RenamePopup renamePopup)
{
using (new UndoBlock(ActorNode.Root.Undo, Actor, "Rename"))
Actor.Name = renamePopup.Text;
// enable scrolling of scene view
Editor.Instance.Windows.SceneWin.ScrollingOnSceneTreeView(true);
}
/// <inheritdoc />