|
|
|
@ -151,7 +151,7 @@ namespace ICSharpCode.TreeView
@@ -151,7 +151,7 @@ namespace ICSharpCode.TreeView
|
|
|
|
|
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); |
|
|
|
|