Browse Source

Refresh AssemblyTreeNode tooltip after selecting a new PDB.

pull/3265/head
Siegfried Pammer 2 years ago
parent
commit
39d5deb38c
  1. 4
      ILSpy/Commands/SelectPdbContextMenuEntry.cs
  2. 10
      ILSpy/TreeNodes/AssemblyTreeNode.cs

4
ILSpy/Commands/SelectPdbContextMenuEntry.cs

@ -46,7 +46,9 @@ namespace ICSharpCode.ILSpy
await assembly.LoadDebugInfo(dlg.FileName); 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(); MainWindow.Instance.RefreshDecompiledView();
} }

10
ILSpy/TreeNodes/AssemblyTreeNode.cs

@ -29,19 +29,19 @@ using ICSharpCode.Decompiler;
using ICSharpCode.Decompiler.CSharp.ProjectDecompiler; using ICSharpCode.Decompiler.CSharp.ProjectDecompiler;
using ICSharpCode.Decompiler.Metadata; using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.TypeSystem; using ICSharpCode.Decompiler.TypeSystem;
using ICSharpCode.ILSpy.Controls.TreeView;
using ICSharpCode.ILSpy.Metadata; using ICSharpCode.ILSpy.Metadata;
using ICSharpCode.ILSpy.Properties; using ICSharpCode.ILSpy.Properties;
using ICSharpCode.ILSpy.ViewModels; using ICSharpCode.ILSpy.ViewModels;
using ICSharpCode.ILSpyX; using ICSharpCode.ILSpyX;
using ICSharpCode.ILSpyX.FileLoaders; using ICSharpCode.ILSpyX.FileLoaders;
using ICSharpCode.ILSpyX.PdbProvider; using ICSharpCode.ILSpyX.PdbProvider;
using ICSharpCode.ILSpy.Controls.TreeView; using ICSharpCode.ILSpyX.TreeView;
using ICSharpCode.ILSpyX.TreeView.PlatformAbstractions; using ICSharpCode.ILSpyX.TreeView.PlatformAbstractions;
using Microsoft.Win32; using Microsoft.Win32;
using TypeDefinitionHandle = System.Reflection.Metadata.TypeDefinitionHandle; using TypeDefinitionHandle = System.Reflection.Metadata.TypeDefinitionHandle;
using ICSharpCode.ILSpyX.TreeView;
namespace ICSharpCode.ILSpy.TreeNodes namespace ICSharpCode.ILSpy.TreeNodes
{ {
@ -168,6 +168,12 @@ namespace ICSharpCode.ILSpy.TreeNodes
} }
} }
public void UpdateToolTip()
{
tooltip = null;
RaisePropertyChanged(nameof(ToolTip));
}
public override bool ShowExpander { public override bool ShowExpander {
get { return !LoadedAssembly.HasLoadError; } get { return !LoadedAssembly.HasLoadError; }
} }

Loading…
Cancel
Save