mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 13:37:25 +08:00
Fix offset adjust control not correctly applying changes after song select quit
This is an interesting scenario where we arrive at a fresh `BeatmapOffsetControl` but with a reference score (from the last play). Our best assumption here is that the beatmap's offset hasn't changed since the last play, so we want to use it for the `lastPlayBeatmapOffset`. But due to unfortunate order of execution, `Current.Value` was not yet initialised.
This commit is contained in:
parent
791ce218fc
commit
37f61b26ea
@ -104,8 +104,6 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
ReferenceScore.BindValueChanged(scoreChanged, true);
|
||||
|
||||
beatmapOffsetSubscription = realm.SubscribeToPropertyChanged(
|
||||
r => r.Find<BeatmapInfo>(beatmap.Value.BeatmapInfo.ID)?.UserSettings,
|
||||
settings => settings.Offset,
|
||||
@ -124,6 +122,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
});
|
||||
|
||||
Current.BindValueChanged(currentChanged);
|
||||
ReferenceScore.BindValueChanged(scoreChanged, true);
|
||||
}
|
||||
|
||||
private void currentChanged(ValueChangedEvent<double> offset)
|
||||
|
Loading…
Reference in New Issue
Block a user