@@ -25,8 +25,7 @@ class Window : BaseWindow
25
25
private const string Window_RepoBranchTooltip = "Active branch" ;
26
26
27
27
[ NonSerialized ] private double notificationClearTime = - 1 ;
28
- [ SerializeField ] private SubTab ? nextTab ;
29
-
28
+ [ SerializeField ] private SubTab nextTab = SubTab . History ;
30
29
[ SerializeField ] private SubTab activeTab = SubTab . History ;
31
30
[ SerializeField ] private InitProjectView initProjectView = new InitProjectView ( ) ;
32
31
[ SerializeField ] private BranchesView branchesView = new BranchesView ( ) ;
@@ -162,10 +161,10 @@ public override void OnUI()
162
161
163
162
DoToolbarGUI ( ) ;
164
163
165
- if ( nextTab . HasValue )
164
+ if ( nextTab != activeTab )
166
165
{
167
- SetActiveTab ( nextTab . Value ) ;
168
- nextTab = null ;
166
+ SetActiveTab ( nextTab ) ;
167
+ nextTab = activeTab ;
169
168
}
170
169
171
170
// GUI for the active tab
@@ -201,7 +200,7 @@ private bool MaybeUpdateData(out string repoRemote)
201
200
{
202
201
if ( activeTab == SubTab . InitProject )
203
202
{
204
- if ( ! nextTab . HasValue || nextTab . Value == SubTab . InitProject )
203
+ if ( nextTab == SubTab . InitProject )
205
204
{
206
205
nextTab = SubTab . History ;
207
206
repoDataChanged = true ;
@@ -229,7 +228,7 @@ private bool MaybeUpdateData(out string repoRemote)
229
228
{
230
229
if ( ! ( activeTab == SubTab . InitProject || activeTab == SubTab . Settings ) )
231
230
{
232
- if ( ! nextTab . HasValue || nextTab . Value != SubTab . InitProject )
231
+ if ( ! ( nextTab == SubTab . InitProject || activeTab == SubTab . Settings ) )
233
232
{
234
233
nextTab = SubTab . InitProject ;
235
234
repoDataChanged = true ;
0 commit comments