Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions src/UnityExtension/Assets/Editor/GitHub.Unity/UI/BranchesView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,10 @@ private void Render()

private void BuildTree()
{
if (treeLocals == null)
if (treeLocals == null || treeRemotes == null)
{
treeLocals = new BranchesTree();
treeLocals.Title = LocalTitle;

treeRemotes = new BranchesTree();
treeRemotes.Title = RemoteTitle;
treeRemotes.IsRemote = true;

TreeOnEnable();
}
Expand All @@ -179,12 +175,17 @@ private void TreeOnEnable()
{
if (treeLocals != null)
{
treeLocals.Title = LocalTitle;

treeLocals.OnEnable();
treeLocals.UpdateIcons(Styles.ActiveBranchIcon, Styles.BranchIcon, Styles.FolderIcon, Styles.GlobeIcon);
}

if (treeRemotes != null)
{
treeRemotes.Title = RemoteTitle;
treeRemotes.IsRemote = true;

treeRemotes.OnEnable();
treeRemotes.UpdateIcons(Styles.ActiveBranchIcon, Styles.BranchIcon, Styles.FolderIcon, Styles.GlobeIcon);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,6 @@ private void BuildTree()
if (treeChanges == null)
{
treeChanges = new ChangesTree();
treeChanges.Title = "Changes";
treeChanges.DisplayRootNode = false;
treeChanges.IsCheckable = true;
treeChanges.PathSeparator = Environment.FileSystem.DirectorySeparatorChar.ToString();

TreeOnEnable();
}
Expand All @@ -212,6 +208,11 @@ private void TreeOnEnable()
{
if (treeChanges != null)
{
treeChanges.Title = "Changes";
treeChanges.DisplayRootNode = false;
treeChanges.IsCheckable = true;
treeChanges.PathSeparator = Environment.FileSystem.DirectorySeparatorChar.ToString();

treeChanges.OnEnable();
treeChanges.UpdateIcons(Styles.FolderIcon);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,10 +719,6 @@ private void BuildTree()
if (treeChanges == null)
{
treeChanges = new ChangesTree();
treeChanges.Title = "Changes";
treeChanges.IsSelectable = false;
treeChanges.DisplayRootNode = false;
treeChanges.PathSeparator = Environment.FileSystem.DirectorySeparatorChar.ToString();

TreeOnEnable();
}
Expand All @@ -735,6 +731,11 @@ private void TreeOnEnable()
{
if (treeChanges != null)
{
treeChanges.Title = "Changes";
treeChanges.IsSelectable = false;
treeChanges.DisplayRootNode = false;
treeChanges.PathSeparator = Environment.FileSystem.DirectorySeparatorChar.ToString();

treeChanges.OnEnable();
treeChanges.UpdateIcons(Styles.FolderIcon);
}
Expand Down