@@ -83,6 +83,8 @@ public override void Initialize(IApplicationManager applicationManager)
83
83
BranchesView . InitializeView ( this ) ;
84
84
SettingsView . InitializeView ( this ) ;
85
85
InitProjectView . InitializeView ( this ) ;
86
+
87
+ titleContent = new GUIContent ( Title , Styles . SmallLogo ) ;
86
88
}
87
89
88
90
public override void OnEnable ( )
@@ -92,9 +94,6 @@ public override void OnEnable()
92
94
#if DEVELOPER_BUILD
93
95
Selection . activeObject = this ;
94
96
#endif
95
- // Set window title
96
- titleContent = new GUIContent ( Title , Styles . SmallLogo ) ;
97
-
98
97
if ( Repository != null )
99
98
Repository . CheckCurrentBranchAndRemoteChangedEvent ( lastCurrentBranchAndRemoteChangedEvent ) ;
100
99
@@ -112,8 +111,6 @@ public override void OnDisable()
112
111
public override void OnDataUpdate ( )
113
112
{
114
113
base . OnDataUpdate ( ) ;
115
- if ( titleContent . image == null )
116
- titleContent = new GUIContent ( Title , Styles . SmallLogo ) ;
117
114
MaybeUpdateData ( ) ;
118
115
119
116
if ( ActiveView != null )
@@ -189,7 +186,7 @@ private void MaybeUpdateData()
189
186
190
187
if ( Repository != null )
191
188
{
192
- if ( currentBranchAndRemoteHasUpdate )
189
+ if ( repoBranch == null || repoRemote == null || currentBranchAndRemoteHasUpdate )
193
190
{
194
191
var repositoryCurrentBranch = Repository . CurrentBranch ;
195
192
var updatedRepoBranch = repositoryCurrentBranch . HasValue ? repositoryCurrentBranch . Value . Name : null ;
@@ -244,13 +241,13 @@ private void MaybeUpdateData()
244
241
}
245
242
}
246
243
247
- if ( shouldUpdateContentFields )
244
+ if ( shouldUpdateContentFields || repoBranchContent == null || repoUrlContent == null )
248
245
{
249
246
repoBranchContent = new GUIContent ( repoBranch , Window_RepoBranchTooltip ) ;
250
247
251
- if ( updatedRepoRemote != null )
248
+ if ( repoRemote != null )
252
249
{
253
- repoUrlContent = new GUIContent ( repoUrl , string . Format ( Window_RepoUrlTooltip , updatedRepoRemote ) ) ;
250
+ repoUrlContent = new GUIContent ( repoUrl , string . Format ( Window_RepoUrlTooltip , repoRemote ) ) ;
254
251
}
255
252
else
256
253
{
0 commit comments