Browse Source

Don't try to SelectAll with single selection.

`Toggle` doesn't mean multiple selection.
Steven Kirk 5 years ago
parent
commit
544686b78d
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/Avalonia.Controls/Primitives/SelectingItemsControl.cs

+ 1 - 2
src/Avalonia.Controls/Primitives/SelectingItemsControl.cs

@@ -491,8 +491,7 @@ namespace Avalonia.Controls.Primitives
 
                 if (ItemCount > 0 &&
                     Match(keymap.SelectAll) &&
-                    (((SelectionMode & SelectionMode.Multiple) != 0) ||
-                      (SelectionMode & SelectionMode.Toggle) != 0))
+                    SelectionMode.HasFlag(SelectionMode.Multiple))
                 {
                     Selection.SelectAll();
                     e.Handled = true;