Improve renaming ContentTreeNode as in #849
This commit is contained in:
@@ -95,19 +95,17 @@ namespace FlaxEditor.Content
|
||||
{
|
||||
if (!_folder.CanRename)
|
||||
return;
|
||||
Editor.Instance.Windows.ContentWin.ScrollingOnTreeView(false);
|
||||
|
||||
// Start renaming the folder
|
||||
var dialog = RenamePopup.Show(this, HeaderRect, _folder.ShortName, false);
|
||||
Editor.Instance.Windows.ContentWin.ScrollingOnTreeView(false);
|
||||
var dialog = RenamePopup.Show(this, TextRect, _folder.ShortName, false);
|
||||
dialog.Tag = _folder;
|
||||
dialog.Renamed += popup =>
|
||||
{
|
||||
Editor.Instance.Windows.ContentWin.Rename((ContentFolder)popup.Tag, popup.Text);
|
||||
Editor.Instance.Windows.ContentWin.ScrollingOnTreeView(true);
|
||||
};
|
||||
dialog.Closed += popup =>
|
||||
{
|
||||
Editor.Instance.Windows.ContentWin.ScrollingOnTreeView(true);
|
||||
};
|
||||
dialog.Closed += popup => { Editor.Instance.Windows.ContentWin.ScrollingOnTreeView(true); };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user