mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 04:22:55 +08:00
Merge pull request #28638 from OliBomby/beat-divisor
Fix editor not loading arbitrary beat divisors
This commit is contained in:
commit
e35744118c
@ -193,5 +193,20 @@ namespace osu.Game.Tests.Visual.Editing
|
||||
AddUntilStep("Wait for song select", () => Game.ScreenStack.CurrentScreen is PlaySongSelect);
|
||||
AddAssert("Tags reverted correctly", () => Game.Beatmap.Value.BeatmapInfo.Metadata.Tags == tags_to_save);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestBeatDivisor()
|
||||
{
|
||||
AddStep("Set custom beat divisor", () => Editor.Dependencies.Get<BindableBeatDivisor>().SetArbitraryDivisor(7));
|
||||
|
||||
SaveEditor();
|
||||
AddAssert("Hash updated", () => !string.IsNullOrEmpty(EditorBeatmap.BeatmapInfo.BeatmapSet?.Hash));
|
||||
AddAssert("Beatmap has correct beat divisor", () => EditorBeatmap.BeatmapInfo.BeatDivisor, () => Is.EqualTo(7));
|
||||
|
||||
ReloadEditorToSameBeatmap();
|
||||
|
||||
AddAssert("Beatmap still has correct beat divisor", () => EditorBeatmap.BeatmapInfo.BeatDivisor, () => Is.EqualTo(7));
|
||||
AddAssert("Correct beat divisor actually active", () => Editor.BeatDivisor, () => Is.EqualTo(7));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -292,7 +292,7 @@ namespace osu.Game.Screens.Edit
|
||||
dependencies.CacheAs<IEditorChangeHandler>(changeHandler);
|
||||
}
|
||||
|
||||
beatDivisor.Value = editorBeatmap.BeatmapInfo.BeatDivisor;
|
||||
beatDivisor.SetArbitraryDivisor(editorBeatmap.BeatmapInfo.BeatDivisor);
|
||||
beatDivisor.BindValueChanged(divisor => editorBeatmap.BeatmapInfo.BeatDivisor = divisor.NewValue);
|
||||
|
||||
updateLastSavedHash();
|
||||
|
Loading…
Reference in New Issue
Block a user