From e13640229b61afb5cbc3ffa97cf4e1835dede814 Mon Sep 17 00:00:00 2001 From: andrei Date: Tue, 2 Nov 2021 14:00:50 +0200 Subject: [PATCH] inventory_multisel: don't toggle denied entries --- src/inventory_ui.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/inventory_ui.cpp b/src/inventory_ui.cpp index 2823695e60b25..fc4cbb72bd9ce 100644 --- a/src/inventory_ui.cpp +++ b/src/inventory_ui.cpp @@ -2551,10 +2551,11 @@ void inventory_multiselector::toggle_entries( int &count, const toggle_mode mode selected = get_active_column().get_all_selected(); break; case toggle_mode::NON_FAVORITE_NON_WORN: { - const auto filter_to_nonfavorite_and_nonworn = []( const inventory_entry & entry ) { + const auto filter_to_nonfavorite_and_nonworn = [this]( const inventory_entry & entry ) { return entry.is_item() && !entry.any_item()->is_favorite && - !get_player_character().is_worn( *entry.any_item() ); + !get_player_character().is_worn( *entry.any_item() ) && + preset.get_denial( entry.any_item() ).empty(); }; selected = get_active_column().get_entries( filter_to_nonfavorite_and_nonworn );