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 && if (ItemCount > 0 &&
Match(keymap.SelectAll) && Match(keymap.SelectAll) &&
(((SelectionMode & SelectionMode.Multiple) != 0) || SelectionMode.HasFlag(SelectionMode.Multiple))
(SelectionMode & SelectionMode.Toggle) != 0))
{ {
Selection.SelectAll(); Selection.SelectAll();
e.Handled = true; e.Handled = true;

Loading…
Cancel
Save