Skip to content

Commit 22c5735

Browse files
author
tom-englert
committed
Fix #3284: AssemblyTree title is wrong
1 parent ee91a37 commit 22c5735

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

ILSpy/AssemblyTree/AssemblyTreeModel.cs

+9-4
Original file line numberDiff line numberDiff line change
@@ -418,17 +418,22 @@ void ShowAssemblyList(AssemblyList assemblyList)
418418

419419
Root = assemblyListTreeNode;
420420

421+
var mainWindow = Application.Current?.MainWindow;
422+
423+
if (mainWindow == null)
424+
return;
425+
421426
if (assemblyList.ListName == AssemblyListManager.DefaultListName)
422427
#if DEBUG
423-
this.Title = $"ILSpy {DecompilerVersionInfo.FullVersion}";
428+
mainWindow.Title = $"ILSpy {DecompilerVersionInfo.FullVersion}";
424429
#else
425-
this.Title = "ILSpy";
430+
mainWindow.Title = "ILSpy";
426431
#endif
427432
else
428433
#if DEBUG
429-
this.Title = $"ILSpy {DecompilerVersionInfo.FullVersion} - " + assemblyList.ListName;
434+
mainWindow.Title = $"ILSpy {DecompilerVersionInfo.FullVersion} - " + assemblyList.ListName;
430435
#else
431-
this.Title = "ILSpy - " + assemblyList.ListName;
436+
mainWindow.Title = "ILSpy - " + assemblyList.ListName;
432437
#endif
433438
}
434439

0 commit comments

Comments
 (0)