mirror of https://github.com/ppy/osu
Use alternative implementation of preset panel cleanup
This commit is contained in:
parent
a0a6e1faee
commit
f74fb3491e
|
@ -82,16 +82,8 @@ private void asyncLoadPanels(IRealmCollection<ModPreset> presets, ChangeSet chan
|
|||
|
||||
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