Avoid potential feedback from bindable event binds

This commit is contained in:
Dean Herbert 2021-02-10 15:32:57 +09:00
parent 67c1c4c1eb
commit b3b0d97354

View File

@ -371,8 +371,11 @@ namespace osu.Game.Overlays.Mods
{
base.LoadComplete();
SelectedMods.BindValueChanged(_ => updateSelectedButtons());
availableMods.BindValueChanged(_ => updateAvailableMods(), true);
// intentionally bound after the above line to avoid a potential update feedback cycle.
// i haven't actually observed this happening but as updateAvailableMods() changes the selection it is plausible.
SelectedMods.BindValueChanged(_ => updateSelectedButtons());
}
protected override void PopOut()