mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 12:17:46 +08:00
Fix operation cancelled exception when changing visual settings
This commit is contained in:
parent
de31187de6
commit
c7db407832
@ -85,12 +85,10 @@ namespace osu.Game.Skinning
|
|||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
beatmapSkins = config.GetBindable<bool>(OsuSetting.BeatmapSkins);
|
beatmapSkins = config.GetBindable<bool>(OsuSetting.BeatmapSkins);
|
||||||
beatmapSkins.ValueChanged += val => onSourceChanged();
|
beatmapSkins.BindValueChanged(_ => onSourceChanged());
|
||||||
beatmapSkins.TriggerChange();
|
|
||||||
|
|
||||||
beatmapHitsounds = config.GetBindable<bool>(OsuSetting.BeatmapHitsounds);
|
beatmapHitsounds = config.GetBindable<bool>(OsuSetting.BeatmapHitsounds);
|
||||||
beatmapHitsounds.ValueChanged += val => onSourceChanged();
|
beatmapHitsounds.BindValueChanged(_ => onSourceChanged(), true);
|
||||||
beatmapHitsounds.TriggerChange();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
|
@ -52,5 +52,12 @@ namespace osu.Game.Skinning
|
|||||||
protected virtual void SkinChanged(ISkinSource skin, bool allowFallback)
|
protected virtual void SkinChanged(ISkinSource skin, bool allowFallback)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void Dispose(bool isDisposing)
|
||||||
|
{
|
||||||
|
base.Dispose(isDisposing);
|
||||||
|
|
||||||
|
skin.SourceChanged -= onChange;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user