mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:57:36 +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();
|
base.LoadComplete();
|
||||||
|
|
||||||
ReferenceScore.BindValueChanged(scoreChanged, true);
|
|
||||||
|
|
||||||
beatmapOffsetSubscription = realm.SubscribeToPropertyChanged(
|
beatmapOffsetSubscription = realm.SubscribeToPropertyChanged(
|
||||||
r => r.Find<BeatmapInfo>(beatmap.Value.BeatmapInfo.ID)?.UserSettings,
|
r => r.Find<BeatmapInfo>(beatmap.Value.BeatmapInfo.ID)?.UserSettings,
|
||||||
settings => settings.Offset,
|
settings => settings.Offset,
|
||||||
@ -124,6 +122,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
|||||||
});
|
});
|
||||||
|
|
||||||
Current.BindValueChanged(currentChanged);
|
Current.BindValueChanged(currentChanged);
|
||||||
|
ReferenceScore.BindValueChanged(scoreChanged, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void currentChanged(ValueChangedEvent<double> offset)
|
private void currentChanged(ValueChangedEvent<double> offset)
|
||||||
|
Loading…
Reference in New Issue
Block a user