Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit ae8e308

Browse files
Using a folder icon when needed
1 parent 0940957 commit ae8e308

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/FileHistoryWindow.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,14 @@ public void SetSelectedPath(NPath path)
4747

4848
if (selectedAssetPath != NPath.Default)
4949
{
50-
nodeIcon = UnityEditorInternal.InternalEditorUtility.GetIconForFile(selectedAssetPath.ToString());
50+
if (selectedAssetPath.DirectoryExists())
51+
{
52+
nodeIcon = Styles.FolderIcon;
53+
}
54+
else
55+
{
56+
nodeIcon = UnityEditorInternal.InternalEditorUtility.GetIconForFile(selectedAssetPath.ToString());
57+
}
5158
}
5259

5360
if (nodeIcon != null)

0 commit comments

Comments
 (0)