Skip to content

Commit

Permalink
Fix #3381: Make sure that selectedNode is still selected when focus i…
Browse files Browse the repository at this point in the history
…s deferred in IsActive property changed handler.
  • Loading branch information
siegfriedpammer committed Jan 29, 2025
1 parent 01d726c commit a592169
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ILSpy/AssemblyTree/AssemblyListPane.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
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
{
Expand Down

0 comments on commit a592169

Please sign in to comment.