Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix focusing bug in SharpTreeView

  • Loading branch information...
commit 7edf1c4f19153facc7e8c17f81515af1a46b5d64 1 parent 0dc7537
@siegfriedpammer siegfriedpammer authored
View
2  src/Libraries/SharpTreeView/ICSharpCode.TreeView/SharpTreeView.cs
@@ -151,7 +151,7 @@ void flattener_CollectionChanged(object sender, NotifyCollectionChangedEventArgs
if (selectedOldItems != null) {
var list = SelectedItems.Cast<SharpTreeNode>().Except(selectedOldItems).ToList();
SetSelectedItems(list);
- if (SelectedItem == null) {
+ if (SelectedItem == null && this.IsKeyboardFocusWithin) {
// if we removed all selected nodes, then move the focus to the node
// preceding the first of the old selected nodes
SelectedIndex = Math.Max(0, e.OldStartingIndex - 1);
Please sign in to comment.
Something went wrong with that request. Please try again.