mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
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:
parent
6d3bd36877
commit
e4e4227709
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue