Fix #12196: always show selected content, even when filtering

This commit is contained in:
Patric Stout 2024-03-01 21:22:20 +01:00 committed by Patric Stout
parent 890040ceea
commit b307541099
1 changed files with 3 additions and 0 deletions

View File

@ -466,6 +466,8 @@ class NetworkContentListWindow : public Window, ContentCallback {
/** Filter content by tags/name */
static bool CDECL TagNameFilter(const ContentInfo * const *a, ContentListFilterData &filter)
{
if ((*a)->state == ContentInfo::SELECTED || (*a)->state == ContentInfo::AUTOSELECTED) return true;
filter.string_filter.ResetState();
for (auto &tag : (*a)->tags) filter.string_filter.AddLine(tag);
@ -808,6 +810,7 @@ public:
if (click_count > 1 || IsInsideBS(pt.x, checkbox->pos_x, checkbox->current_x)) {
_network_content_client.ToggleSelectedState(this->selected);
this->content.ForceResort();
this->content.ForceRebuild();
}
if (this->filter_data.types.any()) {