Browse Source

Don't try to SelectAll with single selection.

`Toggle` doesn't mean multiple selection.
pull/4698/head
Steven Kirk 6 years ago
parent
commit
544686b78d
  1. 3
      src/Avalonia.Controls/Primitives/SelectingItemsControl.cs

3
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;

Loading…
Cancel
Save