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

Commit 0be9c3d

Browse files
Getting the initialize project display working
1 parent de938b3 commit 0be9c3d

File tree

1 file changed

+10
-4
lines changed
  • src/UnityExtension/Assets/Editor/GitHub.Unity/UI

1 file changed

+10
-4
lines changed

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class Window : BaseWindow
2424
private const string Window_RepoBranchTooltip = "Active branch";
2525

2626
[NonSerialized] private double notificationClearTime = -1;
27+
[SerializeField] private SubTab? nextTab;
2728

2829
[SerializeField] private SubTab activeTab = SubTab.History;
2930
[SerializeField] private InitProjectView initProjectView = new InitProjectView();
@@ -159,6 +160,12 @@ public override void OnUI()
159160
DoToolbarGUI();
160161
}
161162

163+
if (nextTab.HasValue)
164+
{
165+
SetActiveTab(nextTab.Value);
166+
nextTab = null;
167+
}
168+
162169
// GUI for the active tab
163170
if (ActiveView != null)
164171
{
@@ -209,8 +216,7 @@ private bool MaybeUpdateData(out string repoRemote)
209216
}
210217
else
211218
{
212-
213-
activeTab = SubTab.InitProject;
219+
nextTab = SubTab.InitProject;
214220
repoBranch = null;
215221
repoUrl = null;
216222
}
@@ -277,7 +283,7 @@ private void DoToolbarGUI()
277283

278284
if (EditorGUI.EndChangeCheck())
279285
{
280-
SetActiveTab(changeTab);
286+
nextTab = changeTab;
281287
}
282288

283289
GUILayout.FlexibleSpace();
@@ -393,7 +399,7 @@ public SettingsView SettingsView
393399

394400
public InitProjectView InitProjectView
395401
{
396-
get { return InitProjectView; }
402+
get { return initProjectView; }
397403
}
398404

399405
private Subview ActiveView

0 commit comments

Comments
 (0)