Skip to content

Commit 845333d

Browse files
committed
Fixed StartRename
1 parent b6f2832 commit 845333d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Prowl.Editor/Tasks/CreateAssetTask.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,10 @@ public enum AssetType
2929

3030
public void StartRename(ContentItem item, bool inTree = false, Action<string>? onConfirm = null, Action? onCancel = null)
3131
{
32-
string id = $"proj_asset_{item.RelativePath}";
32+
string id = inTree ? $"proj_folder_{item.RelativePath}" : $"proj_asset_{item.RelativePath}";
33+
string editName = item.IsFolder ? item.Name : Path.GetFileNameWithoutExtension(item.Name);
3334

34-
RenameOverlay.Begin(id, item.Name, newText =>
35+
RenameOverlay.Begin(id, editName, newText =>
3536
{
3637
string newName = newText;
3738
if (onConfirm != null)

0 commit comments

Comments
 (0)