mirror of https://github.com/OpenTTD/OpenTTD.git
Fix #12196: always show selected content, even when filtering
This commit is contained in:
parent
fb30e46a7e
commit
34dda9e81a
|
@ -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);
|
||||
|
||||
|
@ -811,6 +813,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()) {
|
||||
|
|
Loading…
Reference in New Issue