Merge pull request #18202 from smoogipoo/workaround-freemod-performance

Workaround bad performance when selecting all freemods
This commit is contained in:
Dean Herbert 2022-05-10 16:26:57 +09:00 committed by GitHub
commit 5af18f9574
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -192,6 +192,9 @@ namespace osu.Game.Overlays.Mods
State.BindValueChanged(_ => samplePlaybackDisabled.Value = State.Value == Visibility.Hidden, true);
// This is an optimisation to prevent refreshing the available settings controls when it can be
// reasonably assumed that the settings panel is never to be displayed (e.g. FreeModSelectScreen).
if (customisationButton != null)
((IBindable<IReadOnlyList<Mod>>)modSettingsArea.SelectedMods).BindTo(SelectedMods);
SelectedMods.BindValueChanged(val =>