From ae8e308ea04cbb58cf730467852d869005ca4619 Mon Sep 17 00:00:00 2001 From: Stanley Goldman Date: Wed, 23 Jan 2019 07:59:27 -0500 Subject: [PATCH] Using a folder icon when needed --- .../Assets/Editor/GitHub.Unity/UI/FileHistoryWindow.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/FileHistoryWindow.cs b/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/FileHistoryWindow.cs index 5f89d132a..71285a375 100644 --- a/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/FileHistoryWindow.cs +++ b/src/UnityExtension/Assets/Editor/GitHub.Unity/UI/FileHistoryWindow.cs @@ -47,7 +47,14 @@ public void SetSelectedPath(NPath path) if (selectedAssetPath != NPath.Default) { - nodeIcon = UnityEditorInternal.InternalEditorUtility.GetIconForFile(selectedAssetPath.ToString()); + if (selectedAssetPath.DirectoryExists()) + { + nodeIcon = Styles.FolderIcon; + } + else + { + nodeIcon = UnityEditorInternal.InternalEditorUtility.GetIconForFile(selectedAssetPath.ToString()); + } } if (nodeIcon != null)