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:
parent
a0a6e1faee
commit
f74fb3491e
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user