1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 19:22:56 +08:00

Add exception disallowing potential edit when disabled at a property level

This commit is contained in:
Dean Herbert 2020-04-16 12:11:12 +09:00
parent c4caf38feb
commit 91b13f91ea

View File

@ -324,6 +324,9 @@ namespace osu.Game.Screens.Select
public void Edit(BeatmapInfo beatmap = null)
{
if (!AllowEditing)
throw new InvalidOperationException($"Attempted to edit when {nameof(AllowEditing)} is disabled");
Beatmap.Value = beatmaps.GetWorkingBeatmap(beatmap ?? beatmapNoDebounce);
this.Push(new Editor());
}