Skip to content

Commit

Permalink
Fix #3284: AssemblyTree title is wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-englert committed Sep 23, 2024
1 parent ee91a37 commit 22c5735
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions ILSpy/AssemblyTree/AssemblyTreeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -418,17 +418,22 @@ void ShowAssemblyList(AssemblyList assemblyList)

Root = assemblyListTreeNode;

var mainWindow = Application.Current?.MainWindow;

if (mainWindow == null)
return;

if (assemblyList.ListName == AssemblyListManager.DefaultListName)
#if DEBUG
this.Title = $"ILSpy {DecompilerVersionInfo.FullVersion}";
mainWindow.Title = $"ILSpy {DecompilerVersionInfo.FullVersion}";
#else
this.Title = "ILSpy";
mainWindow.Title = "ILSpy";
#endif
else
#if DEBUG
this.Title = $"ILSpy {DecompilerVersionInfo.FullVersion} - " + assemblyList.ListName;
mainWindow.Title = $"ILSpy {DecompilerVersionInfo.FullVersion} - " + assemblyList.ListName;
#else
this.Title = "ILSpy - " + assemblyList.ListName;
mainWindow.Title = "ILSpy - " + assemblyList.ListName;
#endif
}

Expand Down

0 comments on commit 22c5735

Please sign in to comment.