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

Commit 5ac4b7a

Browse files
Clearing the selected node whenever the tree is rebuilt
1 parent 77df3fa commit 5ac4b7a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public override void OnDisable()
6161
{
6262
base.OnDisable();
6363
DetachHandlers(Repository);
64-
selectedNode = null;
6564
}
6665

6766
public override void OnRepositoryChanged(IRepository oldRepository)
@@ -313,6 +312,9 @@ private void OnRemoteBranchesUpdate(IEnumerable<GitBranch> list)
313312

314313
private void BuildTree(IEnumerable<GitBranch> local, IEnumerable<GitBranch> remote)
315314
{
315+
//Clear the selected node
316+
selectedNode = null;
317+
316318
// Sort
317319
var localBranches = new List<GitBranch>(local);
318320
var remoteBranches = new List<GitBranch>(remote);

0 commit comments

Comments
 (0)