Skip to content

Commit

Permalink
item: ignore collapsed status for empty items
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei8l committed Nov 27, 2022
1 parent 5d298ec commit dcd634d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6742,7 +6742,7 @@ std::string item::display_name( unsigned int quantity ) const

bool item::is_collapsed() const
{
return !contents.get_pockets( []( item_pocket const & pocket ) {
return !contents.empty() && !contents.get_pockets( []( item_pocket const & pocket ) {
return pocket.settings.is_collapsed() && pocket.is_standard_type();
} ).empty();
}
Expand Down

0 comments on commit dcd634d

Please sign in to comment.