diff --git a/ILSpy/AssemblyTree/AssemblyListPane.xaml.cs b/ILSpy/AssemblyTree/AssemblyListPane.xaml.cs index 2e9844d23..3a7fd1664 100644 --- a/ILSpy/AssemblyTree/AssemblyListPane.xaml.cs +++ b/ILSpy/AssemblyTree/AssemblyListPane.xaml.cs @@ -71,7 +71,10 @@ namespace ICSharpCode.ILSpy.AssemblyTree if (SelectedItem is SharpTreeNode selectedItem) { // defer focusing, so it does not interfere with selection via mouse click - this.BeginInvoke(() => FocusNode(selectedItem)); + this.BeginInvoke(() => { + if (this.SelectedItem == selectedItem) + FocusNode(selectedItem); + }); } else {