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