1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 11:42:56 +08:00

Use alternative implementation of preset panel cleanup

This commit is contained in:
Bartłomiej Dach 2022-08-08 21:08:54 +02:00
parent a0a6e1faee
commit f74fb3491e
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -82,16 +82,8 @@ namespace osu.Game.Overlays.Mods
void removeAndDisposePresetPanels()
{
int i = 0;
while (i < ItemsFlow.Count)
{
var item = ItemsFlow[i];
if (item is ModPresetPanel)
item.RemoveAndDisposeImmediately();
else
i++;
}
foreach (var panel in ItemsFlow.OfType<ModPresetPanel>().ToArray())
panel.RemoveAndDisposeImmediately();
}
}