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

Commit 9409168

Browse files
Merge branch 'fixes/branches-view-remove-serialized-texture2d' into fixes/branches-view-globe-icon
# Conflicts: # src/UnityExtension/Assets/Editor/GitHub.Unity/UI/TreeControl.cs
2 parents 9922975 + 9dc931a commit 9409168

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

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

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -483,34 +483,14 @@ protected override Texture2D GetNodeIcon(TreeNode node)
483483

484484
public void UpdateIcons(Texture2D activeBranchIcon, Texture2D branchIcon, Texture2D folderIcon, Texture2D rootFolderIcon)
485485
{
486-
var localsLoaded = false;
487-
488-
if (ActiveNodeIcon == null)
486+
var needsLoad = ActiveNodeIcon == null || BranchIcon == null || FolderIcon == null || RemoteIcon == null;
487+
if (needsLoad)
489488
{
490-
localsLoaded = true;
491489
ActiveNodeIcon = activeBranchIcon;
492-
}
493-
494-
if (BranchIcon == null)
495-
{
496-
localsLoaded = true;
497490
BranchIcon = branchIcon;
498-
}
499-
500-
if (FolderIcon == null)
501-
{
502-
localsLoaded = true;
503491
FolderIcon = folderIcon;
504-
}
505-
506-
if (RemoteIcon == null)
507-
{
508-
localsLoaded = true;
509492
RemoteIcon = rootFolderIcon;
510-
}
511493

512-
if (localsLoaded)
513-
{
514494
LoadNodeIcons();
515495
}
516496
}

0 commit comments

Comments
 (0)