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

Commit 7ab607e

Browse files
Merge pull request #510 from github-for-unity/fixes/first-folder-selected
Checking for the final node to make sure it is active
2 parents afd5c3d + 5a7e768 commit 7ab607e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,16 @@ public void Load(IEnumerable<ITreeData> data, string title)
9191
var alreadyExists = folders.ContainsKey(name);
9292
if (!alreadyExists)
9393
{
94+
var isActive = false;
95+
if (name == d.Name)
96+
{
97+
isActive = d.IsActive;
98+
}
99+
94100
var node = new TreeNode
95101
{
96102
Name = name,
97-
IsActive = d.IsActive,
103+
IsActive = isActive,
98104
Label = label,
99105
Level = level,
100106
IsFolder = isFolder

0 commit comments

Comments
 (0)