From 478b8e29c53d5031700533d23a2120ece0f5417d Mon Sep 17 00:00:00 2001 From: Kurt Date: Tue, 5 May 2020 18:40:48 -0700 Subject: [PATCH] Allow clearing all flags regardless of constraints --- NHSE.WinForms/Subforms/Player/ItemReceivedEditor.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/NHSE.WinForms/Subforms/Player/ItemReceivedEditor.cs b/NHSE.WinForms/Subforms/Player/ItemReceivedEditor.cs index 8196ef8..432a442 100644 --- a/NHSE.WinForms/Subforms/Player/ItemReceivedEditor.cs +++ b/NHSE.WinForms/Subforms/Player/ItemReceivedEditor.cs @@ -50,6 +50,13 @@ public void GiveAll(IReadOnlyList indexes, bool value = true) private void GiveEverything(IReadOnlyList items, bool value = true) { + if (!value) + { + for (ushort i = 0; i < CLB_Items.Items.Count; i++) + CLB_Items.SetItemChecked(i, false); + return; + } + var skip = GameLists.NoCheckReceived; for (ushort i = 1; i < CLB_Items.Items.Count; i++) { @@ -57,7 +64,7 @@ private void GiveEverything(IReadOnlyList items, bool value = true) continue; if (skip.Contains(i)) continue; - CLB_Items.SetItemChecked(i, value); + CLB_Items.SetItemChecked(i, true); } System.Media.SystemSounds.Asterisk.Play(); }