Skip to content

Commit a592169

Browse files
Fix #3381: Make sure that selectedNode is still selected when focus is deferred in IsActive property changed handler.
1 parent 01d726c commit a592169

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ILSpy/AssemblyTree/AssemblyListPane.xaml.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
7171
if (SelectedItem is SharpTreeNode selectedItem)
7272
{
7373
// defer focusing, so it does not interfere with selection via mouse click
74-
this.BeginInvoke(() => FocusNode(selectedItem));
74+
this.BeginInvoke(() => {
75+
if (this.SelectedItem == selectedItem)
76+
FocusNode(selectedItem);
77+
});
7578
}
7679
else
7780
{

0 commit comments

Comments
 (0)