@@ -40,8 +40,6 @@ class Window : BaseWindow
40
40
[ SerializeField ] private CacheUpdateEvent lastCurrentBranchAndRemoteChangedEvent ;
41
41
[ NonSerialized ] private bool currentBranchAndRemoteHasUpdate ;
42
42
43
- [ NonSerialized ] private Texture2D smallLogo ;
44
-
45
43
[ MenuItem ( LaunchMenu ) ]
46
44
public static void Window_GitHub ( )
47
45
{
@@ -94,6 +92,8 @@ public override void Initialize(IApplicationManager applicationManager)
94
92
BranchesView . InitializeView ( this ) ;
95
93
SettingsView . InitializeView ( this ) ;
96
94
InitProjectView . InitializeView ( this ) ;
95
+
96
+ titleContent = new GUIContent ( Title , Styles . SmallLogo ) ;
97
97
}
98
98
99
99
public override void OnEnable ( )
@@ -103,13 +103,6 @@ public override void OnEnable()
103
103
#if DEVELOPER_BUILD
104
104
Selection . activeObject = this ;
105
105
#endif
106
- // Set window title
107
- if ( smallLogo == null )
108
- {
109
- smallLogo = Styles . SmallLogo ;
110
- titleContent = new GUIContent ( Title , smallLogo ) ;
111
- }
112
-
113
106
if ( Repository != null )
114
107
Repository . CheckCurrentBranchAndRemoteChangedEvent ( lastCurrentBranchAndRemoteChangedEvent ) ;
115
108
@@ -127,8 +120,6 @@ public override void OnDisable()
127
120
public override void OnDataUpdate ( )
128
121
{
129
122
base . OnDataUpdate ( ) ;
130
- if ( titleContent . image == null )
131
- titleContent = new GUIContent ( Title , Styles . SmallLogo ) ;
132
123
MaybeUpdateData ( ) ;
133
124
134
125
if ( ActiveView != null )
@@ -204,7 +195,7 @@ private void MaybeUpdateData()
204
195
205
196
if ( Repository != null )
206
197
{
207
- if ( currentBranchAndRemoteHasUpdate )
198
+ if ( repoBranch == null || repoRemote == null || currentBranchAndRemoteHasUpdate )
208
199
{
209
200
var repositoryCurrentBranch = Repository . CurrentBranch ;
210
201
var updatedRepoBranch = repositoryCurrentBranch . HasValue ? repositoryCurrentBranch . Value . Name : null ;
@@ -259,13 +250,13 @@ private void MaybeUpdateData()
259
250
}
260
251
}
261
252
262
- if ( shouldUpdateContentFields )
253
+ if ( shouldUpdateContentFields || repoBranchContent == null || repoUrlContent == null )
263
254
{
264
255
repoBranchContent = new GUIContent ( repoBranch , Window_RepoBranchTooltip ) ;
265
256
266
- if ( updatedRepoRemote != null )
257
+ if ( repoRemote != null )
267
258
{
268
- repoUrlContent = new GUIContent ( repoUrl , string . Format ( Window_RepoUrlTooltip , updatedRepoRemote ) ) ;
259
+ repoUrlContent = new GUIContent ( repoUrl , string . Format ( Window_RepoUrlTooltip , repoRemote ) ) ;
269
260
}
270
261
else
271
262
{
0 commit comments