Merge branch 'rename-trim' of https://github.com/Tryibion/FlaxEngine into Tryibion-rename-trim
This commit is contained in:
@@ -355,7 +355,7 @@ namespace FlaxEditor.SceneGraph.GUI
|
|||||||
private void OnRenamed(RenamePopup renamePopup)
|
private void OnRenamed(RenamePopup renamePopup)
|
||||||
{
|
{
|
||||||
using (new UndoBlock(ActorNode.Root.Undo, Actor, "Rename"))
|
using (new UndoBlock(ActorNode.Root.Undo, Actor, "Rename"))
|
||||||
Actor.Name = renamePopup.Text;
|
Actor.Name = renamePopup.Text.Trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|||||||
@@ -542,6 +542,8 @@ namespace FlaxEditor.Windows
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newShortName = newShortName.Trim();
|
||||||
|
|
||||||
// Cache data
|
// Cache data
|
||||||
string extension = item.IsFolder ? "" : Path.GetExtension(item.Path);
|
string extension = item.IsFolder ? "" : Path.GetExtension(item.Path);
|
||||||
var newPath = StringUtils.CombinePaths(item.ParentFolder.Path, newShortName + extension);
|
var newPath = StringUtils.CombinePaths(item.ParentFolder.Path, newShortName + extension);
|
||||||
|
|||||||
Reference in New Issue
Block a user