Просмотр исходного кода

Fixed multiselecting in tree view

Kenric Nugteren 1 год назад
Родитель
Сommit
8a9cfa26c8
1 измененных файлов с 1 добавлено и 9 удалено
  1. 1 9
      inabox.wpf/DynamicGrid/UIComponent/DynamicGridTreeUIComponent.cs

+ 1 - 9
inabox.wpf/DynamicGrid/UIComponent/DynamicGridTreeUIComponent.cs

@@ -344,15 +344,7 @@ public class DynamicGridTreeUIComponent<T> : IDynamicGridUIComponent<T>, IDynami
 
     private void _tree_SelectionChanged(object? sender, GridSelectionChangedEventArgs e)
     {
-        var row = GetRow(_tree.SelectedItem as CoreTreeNode);
-        if (row is not null)
-        {
-            Parent.SelectItems(new[] { row });
-        }
-        else
-        {
-            Parent.SelectItems(Array.Empty<CoreRow>());
-        }
+        Parent.SelectItems(SelectedRows);
     }
 
     private void _tree_SelectionChanging(object? sender, GridSelectionChangingEventArgs e)