Browse Source

Fix #3381: Make sure that selectedNode is still selected when focus is deferred in IsActive property changed handler.

pull/3389/head
Siegfried Pammer 4 months ago
parent
commit
a592169bb3
  1. 5
      ILSpy/AssemblyTree/AssemblyListPane.xaml.cs

5
ILSpy/AssemblyTree/AssemblyListPane.xaml.cs

@ -71,7 +71,10 @@ namespace ICSharpCode.ILSpy.AssemblyTree @@ -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
{

Loading…
Cancel
Save