From 544686b78d99674bf50984ce5e97008a8a3d319a Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Fri, 18 Sep 2020 11:41:04 +0200 Subject: [PATCH] Don't try to SelectAll with single selection. `Toggle` doesn't mean multiple selection. --- src/Avalonia.Controls/Primitives/SelectingItemsControl.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Avalonia.Controls/Primitives/SelectingItemsControl.cs b/src/Avalonia.Controls/Primitives/SelectingItemsControl.cs index c954f9fd4a..e34b3b145f 100644 --- a/src/Avalonia.Controls/Primitives/SelectingItemsControl.cs +++ b/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;