Fix filter excluding all items when right-clicking the only entry

It was possible to create a community/country/type filter excluding all entries when the list only contains one entry and right-click is used to deselect it.
This commit is contained in:
Robert Müller 2024-02-11 17:21:54 +01:00
parent 6d3bd36877
commit e4e4227709

View file

@ -858,7 +858,10 @@ void CMenus::RenderServerbrowserDDNetFilter(CUIRect View,
else if(Click == 2) else if(Click == 2)
{ {
// Right click: when all are active, only deactivate one // Right click: when all are active, only deactivate one
Filter.Add(GetItemName(ItemIndex)); if(MaxItems >= 2)
{
Filter.Add(GetItemName(ItemIndex));
}
} }
} }
else else