Skip to content
Snippets Groups Projects
Commit 8f1763d7 authored by Stanley Goldman's avatar Stanley Goldman
Browse files

Fix logic to display file icon when there is no icon for a file that has a meta

parent 9671f402
No related branches found
No related tags found
No related merge requests found
......@@ -118,6 +118,12 @@ namespace GitHub.Unity
var target = node.Target;
var isFolder = node.Children.Any();
var isFolderForMeta = false;
if (node.Children.Count() == 1)
{
isFolderForMeta = node.Children.First().Label.Substring(node.Label.Length).Equals(".meta");
}
GUILayout.BeginHorizontal();
{
if (!Readonly)
......@@ -186,7 +192,19 @@ namespace GitHub.Unity
if (Event.current.type == EventType.Repaint)
{
var icon = (Texture) node.Icon ?? (isFolder ? Styles.FolderIcon : Styles.DefaultAssetIcon);
var icon = (Texture) node.Icon;
if (icon == null)
{
if (isFolderForMeta || !isFolder)
{
icon = Styles.DefaultAssetIcon;
}
else
{
icon = Styles.FolderIcon;
}
}
if (icon != null)
{
GUI.DrawTexture(iconRect,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment