mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 07:13:21 +08:00
Merge pull request #11031 from peppy/editor-fix-beat-snapping-new-beatmap
Fix editor beat snapping not working correctly when starting with a new beatmap
This commit is contained in:
commit
297283491a
@ -106,6 +106,12 @@ namespace osu.Game.Screens.Edit
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours, GameHost host, OsuConfigManager config)
|
private void load(OsuColour colours, GameHost host, OsuConfigManager config)
|
||||||
{
|
{
|
||||||
|
if (Beatmap.Value is DummyWorkingBeatmap)
|
||||||
|
{
|
||||||
|
isNewBeatmap = true;
|
||||||
|
Beatmap.Value = beatmapManager.CreateNew(Ruleset.Value, api.LocalUser.Value);
|
||||||
|
}
|
||||||
|
|
||||||
beatDivisor.Value = Beatmap.Value.BeatmapInfo.BeatDivisor;
|
beatDivisor.Value = Beatmap.Value.BeatmapInfo.BeatDivisor;
|
||||||
beatDivisor.BindValueChanged(divisor => Beatmap.Value.BeatmapInfo.BeatDivisor = divisor.NewValue);
|
beatDivisor.BindValueChanged(divisor => Beatmap.Value.BeatmapInfo.BeatDivisor = divisor.NewValue);
|
||||||
|
|
||||||
@ -122,12 +128,6 @@ namespace osu.Game.Screens.Edit
|
|||||||
// todo: remove caching of this and consume via editorBeatmap?
|
// todo: remove caching of this and consume via editorBeatmap?
|
||||||
dependencies.Cache(beatDivisor);
|
dependencies.Cache(beatDivisor);
|
||||||
|
|
||||||
if (Beatmap.Value is DummyWorkingBeatmap)
|
|
||||||
{
|
|
||||||
isNewBeatmap = true;
|
|
||||||
Beatmap.Value = beatmapManager.CreateNew(Ruleset.Value, api.LocalUser.Value);
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
playableBeatmap = Beatmap.Value.GetPlayableBeatmap(Beatmap.Value.BeatmapInfo.Ruleset);
|
playableBeatmap = Beatmap.Value.GetPlayableBeatmap(Beatmap.Value.BeatmapInfo.Ruleset);
|
||||||
|
Loading…
Reference in New Issue
Block a user