Skip to content

Commit

Permalink
Refresh AssemblyTreeNode tooltip after selecting a new PDB.
Browse files Browse the repository at this point in the history
  • Loading branch information
siegfriedpammer committed Aug 17, 2024
1 parent cb63f3c commit 39d5deb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion ILSpy/Commands/SelectPdbContextMenuEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public async void Execute(TextViewContext context)
await assembly.LoadDebugInfo(dlg.FileName);
}

MainWindow.Instance.SelectNode(MainWindow.Instance.FindNodeByPath(new[] { assembly.FileName }, true));
var node = (AssemblyTreeNode)MainWindow.Instance.FindNodeByPath(new[] { assembly.FileName }, true);
node.UpdateToolTip();
MainWindow.Instance.SelectNode(node);
MainWindow.Instance.RefreshDecompiledView();
}

Expand Down
10 changes: 8 additions & 2 deletions ILSpy/TreeNodes/AssemblyTreeNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@
using ICSharpCode.Decompiler.CSharp.ProjectDecompiler;
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem;
using ICSharpCode.ILSpy.Controls.TreeView;
using ICSharpCode.ILSpy.Metadata;
using ICSharpCode.ILSpy.Properties;
using ICSharpCode.ILSpy.ViewModels;
using ICSharpCode.ILSpyX;
using ICSharpCode.ILSpyX.FileLoaders;
using ICSharpCode.ILSpyX.PdbProvider;
using ICSharpCode.ILSpy.Controls.TreeView;
using ICSharpCode.ILSpyX.TreeView;
using ICSharpCode.ILSpyX.TreeView.PlatformAbstractions;

using Microsoft.Win32;

using TypeDefinitionHandle = System.Reflection.Metadata.TypeDefinitionHandle;
using ICSharpCode.ILSpyX.TreeView;

namespace ICSharpCode.ILSpy.TreeNodes
{
Expand Down Expand Up @@ -168,6 +168,12 @@ public override object ToolTip {
}
}

public void UpdateToolTip()
{
tooltip = null;
RaisePropertyChanged(nameof(ToolTip));
}

public override bool ShowExpander {
get { return !LoadedAssembly.HasLoadError; }
}
Expand Down

0 comments on commit 39d5deb

Please sign in to comment.