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 +15
-28
lines changed
src/UnityExtension/Assets/Editor/GitHub.Unity/UI Expand file tree Collapse file tree 1 file changed +15
-28
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,21 @@ public override void OnDataUpdate()
120
120
}
121
121
}
122
122
123
+ if ( nextTab != activeTab )
124
+ {
125
+ var fromView = ActiveView ;
126
+ activeTab = nextTab ;
127
+
128
+ GUI . FocusControl ( null ) ;
129
+
130
+ if ( fromView != null )
131
+ fromView . OnDisable ( ) ;
132
+
133
+ ActiveView . OnEnable ( ) ;
134
+
135
+ Refresh ( ) ;
136
+ }
137
+
123
138
if ( ActiveView != null )
124
139
ActiveView . OnDataUpdate ( ) ;
125
140
}
@@ -161,12 +176,6 @@ public override void OnUI()
161
176
162
177
DoToolbarGUI ( ) ;
163
178
164
- if ( nextTab != activeTab )
165
- {
166
- SetActiveTab ( nextTab ) ;
167
- nextTab = activeTab ;
168
- }
169
-
170
179
// GUI for the active tab
171
180
if ( ActiveView != null )
172
181
{
@@ -323,28 +332,6 @@ private void DoToolbarGUI()
323
332
EditorGUILayout . EndHorizontal ( ) ;
324
333
}
325
334
326
- private void SetActiveTab ( SubTab changeTab )
327
- {
328
- if ( changeTab != activeTab )
329
- {
330
- var fromView = ActiveView ;
331
- activeTab = changeTab ;
332
- SwitchView ( fromView , ActiveView ) ;
333
- }
334
- }
335
-
336
- private void SwitchView ( Subview fromView , Subview toView )
337
- {
338
- GUI . FocusControl ( null ) ;
339
-
340
- if ( fromView != null )
341
- fromView . OnDisable ( ) ;
342
-
343
- toView . OnEnable ( ) ;
344
-
345
- Refresh ( ) ;
346
- }
347
-
348
335
private void DoAccountDropdown ( )
349
336
{
350
337
GenericMenu accountMenu = new GenericMenu ( ) ;
You can’t perform that action at this time.
0 commit comments