This repository was archived by the owner on Dec 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
src/UnityExtension/Assets/Editor/GitHub.Unity/UI Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ class Window : BaseWindow
24
24
private const string Window_RepoBranchTooltip = "Active branch" ;
25
25
26
26
[ NonSerialized ] private double notificationClearTime = - 1 ;
27
+ [ SerializeField ] private SubTab ? nextTab ;
27
28
28
29
[ SerializeField ] private SubTab activeTab = SubTab . History ;
29
30
[ SerializeField ] private InitProjectView initProjectView = new InitProjectView ( ) ;
@@ -159,6 +160,12 @@ public override void OnUI()
159
160
DoToolbarGUI ( ) ;
160
161
}
161
162
163
+ if ( nextTab . HasValue )
164
+ {
165
+ SetActiveTab ( nextTab . Value ) ;
166
+ nextTab = null ;
167
+ }
168
+
162
169
// GUI for the active tab
163
170
if ( ActiveView != null )
164
171
{
@@ -209,8 +216,7 @@ private bool MaybeUpdateData(out string repoRemote)
209
216
}
210
217
else
211
218
{
212
-
213
- activeTab = SubTab . InitProject ;
219
+ nextTab = SubTab . InitProject ;
214
220
repoBranch = null ;
215
221
repoUrl = null ;
216
222
}
@@ -277,7 +283,7 @@ private void DoToolbarGUI()
277
283
278
284
if ( EditorGUI . EndChangeCheck ( ) )
279
285
{
280
- SetActiveTab ( changeTab ) ;
286
+ nextTab = changeTab ;
281
287
}
282
288
283
289
GUILayout . FlexibleSpace ( ) ;
@@ -393,7 +399,7 @@ public SettingsView SettingsView
393
399
394
400
public InitProjectView InitProjectView
395
401
{
396
- get { return InitProjectView ; }
402
+ get { return initProjectView ; }
397
403
}
398
404
399
405
private Subview ActiveView
You can’t perform that action at this time.
0 commit comments